Sha256: 7cc6ad418cccfe651c63f23e5ea800d90fb3625d86cb2f2f1ad49be86b78d21d
Contents?: true
Size: 672 Bytes
Versions: 36
Compression:
Stored size: 672 Bytes
Contents
module Skylight class Api include Util::Logging attr_reader :config, :http def initialize(config, service = :accounts) @config = config @http = Util::HTTP.new(config, service) end def authentication @http.authentication end def authentication=(token) @http.authentication = token end def login(email, password) res = http.get('/me', 'X-Email' => email, 'X-Password' => password) if res && res.success? res.get('me.authentication_token') end end def create_app(name) res = @http.post('/apps', { app: { name: name }}) res if res.success? end end end
Version data entries
36 entries across 36 versions & 1 rubygems