Class: Deploygate::Client

Inherits:
Object
  • Object
show all
Includes:
API, Apps, Organizations
Defined in:
lib/deploygate/client.rb,
lib/deploygate/client/api.rb,
lib/deploygate/client/apps.rb,
lib/deploygate/client/version.rb,
lib/deploygate/client/response.rb,
lib/deploygate/client/organizations.rb

Overview

Client for the Deploygate API

Defined Under Namespace

Modules: API, Apps, Organizations Classes: Response

Constant Summary collapse

VERSION =
'0.1.0'

Constants included from Apps

Apps::PLATFORM_ANDROID, Apps::PLATFORM_IOS, Apps::ROLE_DEVELOPER, Apps::ROLE_TESTER

Constants included from API

API::BASE_URL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Organizations

#add_organization, #add_organization_member, #add_organization_member_by_email, #add_team_member, #delete_organization, #delete_organization_member, #delete_organization_member_by_email, #delete_team_member, #organization, #organization_members, #organizations, #team_members, #update_organization

Methods included from Apps

#add_app_members, #add_app_team, #app_members, #app_teams, #delete_app_distribution, #delete_app_members, #delete_app_team, #upload_app

Constructor Details

#initialize(token:, symbolize_response: false, open_timeout: 10, timeout: 30) ⇒ Deploygate::Client

Use options passed in

Parameters:

  • token (String)

    DeployGate API token

  • symbolize_response (Hash) (defaults to: false)

    a customizable set of options

  • open_timeout (Hash) (defaults to: 10)

    a customizable set of options

  • timeout (Hash) (defaults to: 30)

    a customizable set of options

Options Hash (symbolize_response:):

  • Parse (Boolean)

    response to symbolized hash

Options Hash (open_timeout:):

  • Open (Integer)

    timeout Integer in seconds

Options Hash (timeout:):

  • Read (Integer)

    timeout Integer in seconds



26
27
28
29
30
31
# File 'lib/deploygate/client.rb', line 26

def initialize(token:, symbolize_response: false, open_timeout: 10, timeout: 30)
  @token = token
  @symbolize_response = symbolize_response
  @open_timeout = open_timeout
  @timeout = timeout
end

Instance Attribute Details

#open_timeoutObject (readonly)

Returns the value of attribute open_timeout.



17
18
19
# File 'lib/deploygate/client.rb', line 17

def open_timeout
  @open_timeout
end

#symbolize_responseObject (readonly)

Returns the value of attribute symbolize_response.



17
18
19
# File 'lib/deploygate/client.rb', line 17

def symbolize_response
  @symbolize_response
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



17
18
19
# File 'lib/deploygate/client.rb', line 17

def timeout
  @timeout
end

#tokenObject (readonly)

Returns the value of attribute token.



17
18
19
# File 'lib/deploygate/client.rb', line 17

def token
  @token
end