Module: ADN
- Defined in:
- lib/adn.rb,
lib/adn/api.rb,
lib/adn/post.rb,
lib/adn/user.rb,
lib/adn/message.rb,
lib/adn/recipes.rb,
lib/adn/version.rb,
lib/adn/api/post.rb,
lib/adn/api/user.rb,
lib/adn/api/token.rb,
lib/adn/constants.rb,
lib/adn/api/filter.rb,
lib/adn/api/stream.rb,
lib/adn/api/message.rb,
lib/adn/api/response.rb,
lib/adn/api/subscription.rb
Defined Under Namespace
Modules: API, Recipes Classes: Message, Post, User
Constant Summary collapse
- Error =
Class.new StandardError
- MAJOR =
0- MINOR =
3- TINY =
6- VERSION =
[MAJOR, MINOR, TINY].join('.')
- API_HOST =
"alpha-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"- HTTP =
Net::HTTP.new(API_HOST, 443)
- HTTP_ERROR =
400
Class Attribute Summary collapse
-
.token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
Class Attribute Details
.token ⇒ Object
Returns the value of attribute token.
38 39 40 |
# File 'lib/adn.rb', line 38 def token @token end |
Class Method Details
.create_collection(data, type) ⇒ Object
45 46 47 |
# File 'lib/adn.rb', line 45 def self.create_collection(data, type) data.map { |t| type.new(t) } end |
.create_instance(data, type) ⇒ Object
41 42 43 |
# File 'lib/adn.rb', line 41 def self.create_instance(data, type) type.new(data) end |