Module: Singly

Defined in:
lib/singly/endpoint.rb,
lib/singly.rb,
lib/version.rb,
lib/singly/http.rb,
lib/singly/error.rb,
lib/singly/api/id.rb,
lib/singly/logger.rb,
lib/singly/account.rb,
lib/singly/api/auth.rb,
lib/singly/api/multi.rb,
lib/singly/api/proxy.rb,
lib/singly/api/types.rb,
lib/singly/api/friends.rb,
lib/singly/api/profile.rb,
lib/singly/api/profiles.rb,
lib/singly/api/services.rb,
lib/singly/api/proxy/get.rb,
lib/singly/api/proxy/put.rb,
lib/singly/api/auth/merge.rb,
lib/singly/api/proxy/post.rb,
lib/singly/api/types/type.rb,
lib/singly/api/auth/service.rb,
lib/singly/api/proxy/delete.rb,
lib/singly/api/services/zeo.rb,
lib/singly/api/friends/group.rb,
lib/singly/api/profiles/self.rb,
lib/singly/api/services/gcal.rb,
lib/singly/api/services/rdio.rb,
lib/singly/api/services/tout.rb,
lib/singly/api/services/gdocs.rb,
lib/singly/api/services/gmail.rb,
lib/singly/api/services/gplus.rb,
lib/singly/api/services/imgur.rb,
lib/singly/api/services/klout.rb,
lib/singly/api/profiles/delete.rb,
lib/singly/api/services/dwolla.rb,
lib/singly/api/services/fitbit.rb,
lib/singly/api/services/flickr.rb,
lib/singly/api/services/github.rb,
lib/singly/api/services/google.rb,
lib/singly/api/services/meetup.rb,
lib/singly/api/services/paypal.rb,
lib/singly/api/services/picasa.rb,
lib/singly/api/services/reddit.rb,
lib/singly/api/services/tumblr.rb,
lib/singly/api/services/yammer.rb,
lib/singly/api/profiles/service.rb,
lib/singly/api/services/dropbox.rb,
lib/singly/api/services/service.rb,
lib/singly/api/services/twitter.rb,
lib/singly/api/services/youtube.rb,
lib/singly/api/services/endpoint.rb,
lib/singly/api/services/facebook.rb,
lib/singly/api/services/linkedin.rb,
lib/singly/api/services/withings.rb,
lib/singly/api/services/37signals.rb,
lib/singly/api/services/bodymedia.rb,
lib/singly/api/services/gcontacts.rb,
lib/singly/api/services/instagram.rb,
lib/singly/api/services/runkeeper.rb,
lib/singly/api/services/wordpress.rb,
lib/singly/api/services/foursquare.rb,
lib/singly/api/services/shutterfly.rb,
lib/singly/api/services/soundcloud.rb,
lib/singly/api/services/stocktwits.rb,
lib/singly/api/profiles/self_update.rb,
lib/singly/api/services/id_endpoint.rb,
lib/singly/api/profiles/delete_profile.rb,
lib/singly/api/profiles/delete_service.rb,
lib/singly/api/auth/service/oauth1_apply.rb,
lib/singly/api/auth/service/oauth2_apply.rb

Overview

This module makes one significant assumption about the structure of a singly endpoint: That no full path will contain the ‘:’ semicolon character. Semicolons here are used to describe the structure of an endpoint. For example, when invoking the #endpoint class method:

endpoint :get, "/services/:service/:endpoint", required: [:access_token]

Defined Under Namespace

Modules: Endpoint, Logger Classes: Account, ApiError, Auth, Error, Friends, Http, Id, Multi, Profile, Profiles, Proxy, Services, TimeoutError, Types

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_idObject

Returns the value of attribute client_id.



19
20
21
# File 'lib/singly.rb', line 19

def client_id
  @client_id
end

.client_secretObject

Returns the value of attribute client_secret.



20
21
22
# File 'lib/singly.rb', line 20

def client_secret
  @client_secret
end

.timeoutObject

Returns the value of attribute timeout.



23
24
25
# File 'lib/singly.rb', line 23

def timeout
  @timeout
end

.verboseObject

Returns the value of attribute verbose.



21
22
23
# File 'lib/singly.rb', line 21

def verbose
  @verbose
end

.versionObject

Returns the value of attribute version.



22
23
24
# File 'lib/singly.rb', line 22

def version
  @version
end

Class Method Details

.account(access_token, account = nil) ⇒ Object



29
30
31
# File 'lib/singly.rb', line 29

def (access_token, =nil)
  Singly::Account.new(access_token, )
end

.authObject



33
34
35
# File 'lib/singly.rb', line 33

def auth
  Singly::Auth.new
end

.multi(urls) ⇒ Object



37
38
39
# File 'lib/singly.rb', line 37

def multi(urls)
  Singly::Multi.new(urls: urls.join(","))
end

.servicesObject



25
26
27
# File 'lib/singly.rb', line 25

def services
  Singly::Services.new
end