Module: ADNReborn

Defined in:
lib/adn-reborn.rb,
lib/adn-reborn/api.rb,
lib/adn-reborn/file.rb,
lib/adn-reborn/post.rb,
lib/adn-reborn/user.rb,
lib/adn-reborn/message.rb,
lib/adn-reborn/version.rb,
lib/adn-reborn/api/file.rb,
lib/adn-reborn/api/post.rb,
lib/adn-reborn/api/user.rb,
lib/adn-reborn/api/token.rb,
lib/adn-reborn/constants.rb,
lib/adn-reborn/api/filter.rb,
lib/adn-reborn/api/stream.rb,
lib/adn-reborn/api/message.rb,
lib/adn-reborn/api/response.rb,
lib/adn-reborn/api/subscription.rb,
lib/adn-reborn/recipes/broadcast_message_builder.rb

Defined Under Namespace

Modules: API, Recipes Classes: File, Message, Post, User

Constant Summary collapse

Error =
Class.new StandardError
MAJOR =
0
MINOR =
5
TINY =
0
VERSION =
[MAJOR, MINOR, TINY].join('.')
API_HOST =
"api.app.net"
API_ENDPOINT =
"/stream/0"
API_ENDPOINT_POSTS =
"#{API_ENDPOINT}/posts"
API_ENDPOINT_USERS =
"#{API_ENDPOINT}/users"
API_ENDPOINT_TOKEN =
"#{API_ENDPOINT}/token"
API_ENDPOINT_CHANNELS =
"#{API_ENDPOINT}/channels"
API_ENDPOINT_FILES =
"#{API_ENDPOINT}/files"
HTTP =
Net::HTTP.new(API_HOST, 443)
HTTP_ERROR =
400

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.tokenObject

Returns the value of attribute token.



59
60
61
# File 'lib/adn-reborn.rb', line 59

def token
  @token
end

Class Method Details

.create_collection(data, type) ⇒ Object



66
67
68
# File 'lib/adn-reborn.rb', line 66

def self.create_collection(data, type)
  data.map { |t| type.new(t) }
end

.create_instance(data, type) ⇒ Object



62
63
64
# File 'lib/adn-reborn.rb', line 62

def self.create_instance(data, type)
  type.new(data)
end