Module: RubyLokaliseApi
- 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/oauth2/auth.rb,
lib/ruby_lokalise_api/rest/orders.rb,
lib/ruby_lokalise_api/base_request.rb,
lib/ruby_lokalise_api/json_handler.rb,
lib/ruby_lokalise_api/oauth2_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/oauth2/request.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/oauth2/connection.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/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/rest/team_user_groups.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: BaseRequest, Collections, Connection, JsonHandler, OAuth2, Request, Resources, Rest, Utils Classes: Client, Error, OAuth2Client
Constant Summary collapse
- VERSION =
'6.0.0'
Class Method Summary collapse
- .auth_client(client_id, client_secret) ⇒ Object
-
.client(token, params = {}) ⇒ RubyLokaliseApi::Client
Initializes a new Client object.
-
.oauth2_client(token, params = {}) ⇒ RubyLokaliseApi::OAuth2Client
Initializes a new OAuth2Client object.
-
.reset_client! ⇒ Object
Reset the currently set client.
-
.reset_oauth2_client! ⇒ Object
Reset the currently set OAuth2 client.
Class Method Details
.auth_client(client_id, client_secret) ⇒ Object
46 47 48 |
# File 'lib/ruby_lokalise_api.rb', line 46 def auth_client(client_id, client_secret) RubyLokaliseApi::OAuth2::Auth.new client_id, client_secret end |
.client(token, params = {}) ⇒ RubyLokaliseApi::Client
Initializes a new Client object
23 24 25 |
# File 'lib/ruby_lokalise_api.rb', line 23 def client(token, params = {}) @client = RubyLokaliseApi::Client.new token, params end |
.oauth2_client(token, params = {}) ⇒ RubyLokaliseApi::OAuth2Client
Initializes a new OAuth2Client object
37 38 39 |
# File 'lib/ruby_lokalise_api.rb', line 37 def oauth2_client(token, params = {}) @oauth2_client = RubyLokaliseApi::OAuth2Client.new token, params end |
.reset_client! ⇒ Object
Reset the currently set client
28 29 30 |
# File 'lib/ruby_lokalise_api.rb', line 28 def reset_client! @client = nil end |
.reset_oauth2_client! ⇒ Object
Reset the currently set OAuth2 client
42 43 44 |
# File 'lib/ruby_lokalise_api.rb', line 42 def reset_oauth2_client! @oauth2_client = nil end |