Sha256: 56f1be7934aeb7b2f15def1bd81f30f3c92a947bc1d1edf7221984428e3f54e5
Contents?: true
Size: 645 Bytes
Versions: 7
Compression:
Stored size: 645 Bytes
Contents
module Skylight class Api 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
7 entries across 7 versions & 1 rubygems