Module: Lokalise

Defined in:
lib/ruby-lokalise-api/utils/string_utils.rb,
lib/ruby-lokalise-api.rb,
lib/ruby-lokalise-api/error.rb,
lib/ruby-lokalise-api/client.rb,
lib/ruby-lokalise-api/request.rb,
lib/ruby-lokalise-api/version.rb,
lib/ruby-lokalise-api/rest/keys.rb,
lib/ruby-lokalise-api/connection.rb,
lib/ruby-lokalise-api/rest/files.rb,
lib/ruby-lokalise-api/rest/tasks.rb,
lib/ruby-lokalise-api/rest/teams.rb,
lib/ruby-lokalise-api/rest/orders.rb,
lib/ruby-lokalise-api/json_handler.rb,
lib/ruby-lokalise-api/oauth_client.rb,
lib/ruby-lokalise-api/resources/key.rb,
lib/ruby-lokalise-api/rest/branches.rb,
lib/ruby-lokalise-api/rest/comments.rb,
lib/ruby-lokalise-api/rest/projects.rb,
lib/ruby-lokalise-api/rest/segments.rb,
lib/ruby-lokalise-api/rest/webhooks.rb,
lib/ruby-lokalise-api/resources/base.rb,
lib/ruby-lokalise-api/resources/file.rb,
lib/ruby-lokalise-api/resources/task.rb,
lib/ruby-lokalise-api/resources/team.rb,
lib/ruby-lokalise-api/rest/languages.rb,
lib/ruby-lokalise-api/rest/snapshots.rb,
lib/ruby-lokalise-api/collections/key.rb,
lib/ruby-lokalise-api/resources/order.rb,
lib/ruby-lokalise-api/rest/team_users.rb,
lib/ruby-lokalise-api/collections/base.rb,
lib/ruby-lokalise-api/collections/file.rb,
lib/ruby-lokalise-api/collections/task.rb,
lib/ruby-lokalise-api/collections/team.rb,
lib/ruby-lokalise-api/resources/branch.rb,
lib/ruby-lokalise-api/rest/screenshots.rb,
lib/ruby-lokalise-api/collections/order.rb,
lib/ruby-lokalise-api/resources/project.rb,
lib/ruby-lokalise-api/resources/segment.rb,
lib/ruby-lokalise-api/resources/webhook.rb,
lib/ruby-lokalise-api/rest/contributors.rb,
lib/ruby-lokalise-api/rest/translations.rb,
lib/ruby-lokalise-api/collections/branch.rb,
lib/ruby-lokalise-api/resources/snapshot.rb,
lib/ruby-lokalise-api/rest/payment_cards.rb,
lib/ruby-lokalise-api/collections/project.rb,
lib/ruby-lokalise-api/collections/segment.rb,
lib/ruby-lokalise-api/collections/webhook.rb,
lib/ruby-lokalise-api/resources/team_user.rb,
lib/ruby-lokalise-api/collections/snapshot.rb,
lib/ruby-lokalise-api/resources/screenshot.rb,
lib/ruby-lokalise-api/rest/team_user_group.rb,
lib/ruby-lokalise-api/collections/team_user.rb,
lib/ruby-lokalise-api/resources/contributor.rb,
lib/ruby-lokalise-api/resources/key_comment.rb,
lib/ruby-lokalise-api/resources/translation.rb,
lib/ruby-lokalise-api/rest/queued_processes.rb,
lib/ruby-lokalise-api/collections/screenshot.rb,
lib/ruby-lokalise-api/resources/payment_card.rb,
lib/ruby-lokalise-api/utils/endpoint_helpers.rb,
lib/ruby-lokalise-api/collections/contributor.rb,
lib/ruby-lokalise-api/collections/key_comment.rb,
lib/ruby-lokalise-api/collections/translation.rb,
lib/ruby-lokalise-api/utils/attribute_helpers.rb,
lib/ruby-lokalise-api/collections/payment_card.rb,
lib/ruby-lokalise-api/resources/queued_process.rb,
lib/ruby-lokalise-api/resources/project_comment.rb,
lib/ruby-lokalise-api/resources/system_language.rb,
lib/ruby-lokalise-api/resources/team_user_group.rb,
lib/ruby-lokalise-api/collections/queued_process.rb,
lib/ruby-lokalise-api/resources/project_language.rb,
lib/ruby-lokalise-api/rest/translation_providers.rb,
lib/ruby-lokalise-api/collections/project_comment.rb,
lib/ruby-lokalise-api/collections/system_language.rb,
lib/ruby-lokalise-api/collections/team_user_group.rb,
lib/ruby-lokalise-api/collections/project_language.rb,
lib/ruby-lokalise-api/resources/translation_provider.rb,
lib/ruby-lokalise-api/rest/team_user_billing_details.rb,
lib/ruby-lokalise-api/collections/translation_provider.rb,
lib/ruby-lokalise-api/rest/custom_translation_statuses.rb,
lib/ruby-lokalise-api/resources/custom_translation_status.rb,
lib/ruby-lokalise-api/resources/team_user_billing_details.rb,
lib/ruby-lokalise-api/collections/custom_translation_status.rb

Overview

Initial code taken from Facets gem by Rubyworks github.com/rubyworks/facets/blob/master/lib/core/facets/string/snakecase.rb

Defined Under Namespace

Modules: Collections, Connection, JsonHandler, Request, Resources, Utils Classes: Client, Error, OAuthClient

Constant Summary collapse

VERSION =
'4.5.0'

Class Method Summary collapse

Class Method Details

.client(token, params = {}) ⇒ Lokalise::Client

Initializes a new Client object

Parameters:

  • token (String)
  • params (Hash) (defaults to: {})

Returns:



78
79
80
# File 'lib/ruby-lokalise-api.rb', line 78

def client(token, params = {})
  @client ||= Lokalise::Client.new token, params
end

.oauth_client(token, params = {}) ⇒ Lokalise::OAuthClient

Initializes a new OAuthClient object

Parameters:

  • token (String)
  • params (Hash) (defaults to: {})

Returns:



92
93
94
# File 'lib/ruby-lokalise-api.rb', line 92

def oauth_client(token, params = {})
  @oauth_client ||= Lokalise::OAuthClient.new token, params
end

.reset_client!Object

Reset the currently set client



83
84
85
# File 'lib/ruby-lokalise-api.rb', line 83

def reset_client!
  @client = nil
end

.reset_oauth_client!Object

Reset the currently set OAuth client



97
98
99
# File 'lib/ruby-lokalise-api.rb', line 97

def reset_oauth_client!
  @oauth_client = nil
end