class Transifex::Client

Public Class Methods

new(options = {}) click to toggle source
# File lib/transifex/client.rb, line 7
def initialize(options = {})
  set_credentials(
    options[:username] || Transifex.username,
    options[:password] || Transifex.password
  )
end

Public Instance Methods

project(slug) click to toggle source
# File lib/transifex/client.rb, line 20
def project(slug)
  Transifex::Project.new(get("/project/#{slug}/")).tap do |project|
    project.client = self
  end
end
projects() click to toggle source
# File lib/transifex/client.rb, line 14
def projects
  get('/projects/').map do |project|
    Transifex::Project.new(project).tap {|p| p.client = self }
  end
end