class Confy::Client

Public Class Methods

new(auth = {}, options = {}) click to toggle source
# File lib/confy/client.rb, line 17
def initialize(auth = {}, options = {})
  @http_client = Confy::HttpClient::HttpClient.new(auth, options)
end

Public Instance Methods

access(org, project) click to toggle source

List of teams whic have access to the project. Default team __Owners__ will have access to every project. Authenticated user should be the owner of the organization for the below endpoints.

org - Name of the organization project - Name of the project

# File lib/confy/client.rb, line 57
def access(org, project)
  Confy::Api::Access.new(org, project, @http_client)
end
config(org, project, env) click to toggle source

Any member of the team which has access to the project can retrieve any of it's environment's configuration document or edit it.

org - Name of the organization project - Name of the project env - Name of the environment

# File lib/confy/client.rb, line 74
def config(org, project, env)
  Confy::Api::Config.new(org, project, env, @http_client)
end
envs(org, project) click to toggle source

Every project has a default environment named Production. Each environment has __one__ configuration document which can have many keys and values.

org - Name of the organization project - Name of the project

# File lib/confy/client.rb, line 65
def envs(org, project)
  Confy::Api::Envs.new(org, project, @http_client)
end
members(org, team) click to toggle source

Teams contain a list of users. The Authenticated user should be the owner of the organization.

org - Name of the organization team - Name of the team

# File lib/confy/client.rb, line 42
def members(org, team)
  Confy::Api::Members.new(org, team, @http_client)
end
orgs() click to toggle source

Organizations are owned by users and only (s)he can add/remove teams and projects for that organization. A default organization will be created for every user.

# File lib/confy/client.rb, line 27
def orgs()
  Confy::Api::Orgs.new(@http_client)
end
projects(org) click to toggle source

An organization can contain any number of projects.

org - Name of the organization

# File lib/confy/client.rb, line 49
def projects(org)
  Confy::Api::Projects.new(org, @http_client)
end
teams(org) click to toggle source

Every organization will have a default team named __Owners__. Owner of the organization will be a default member for every team.

org - Name of the organization

# File lib/confy/client.rb, line 34
def teams(org)
  Confy::Api::Teams.new(org, @http_client)
end
user() click to toggle source

User who is authenticated currently.

# File lib/confy/client.rb, line 22
def user()
  Confy::Api::User.new(@http_client)
end