{"id":13879879,"url":"https://github.com/treasure-data/td-client-ruby","last_synced_at":"2025-05-16T10:06:09.403Z","repository":{"id":829440,"uuid":"2242689","full_name":"treasure-data/td-client-ruby","owner":"treasure-data","description":"Ruby Client Library for Treasure Data","archived":false,"fork":false,"pushed_at":"2025-03-24T05:13:59.000Z","size":923,"stargazers_count":23,"open_issues_count":4,"forks_count":24,"subscribers_count":83,"default_branch":"master","last_synced_at":"2025-04-23T13:59:10.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.treasure-data.com/articles/rest-api-ruby-client","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treasure-data.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-08-21T08:19:23.000Z","updated_at":"2025-03-20T19:29:18.000Z","dependencies_parsed_at":"2025-04-23T13:57:15.714Z","dependency_job_id":"3fee8ef2-8ec6-43b7-82a7-a43c51af4036","html_url":"https://github.com/treasure-data/td-client-ruby","commit_stats":{"total_commits":566,"total_committers":35,"mean_commits":16.17142857142857,"dds":0.7791519434628975,"last_synced_commit":"b9f8383ab19aba2d70b9322fe4322d8120940aa5"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Ftd-client-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treasure-data","download_url":"https://codeload.github.com/treasure-data/td-client-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509477,"owners_count":22082891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:02:37.314Z","updated_at":"2025-05-16T10:06:09.387Z","avatar_url":"https://github.com/treasure-data.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Treasure Data API library for Ruby\n\n[\u003cimg src=\"https://coveralls.io/repos/treasure-data/td-client-ruby/badge.svg?branch=master\u0026service=github\" alt=\"Coverage Status\" /\u003e](https://coveralls.io/github/treasure-data/td-client-ruby?branch=master)\n\n## Getting Started\n\n    \u003e gem install td-client\n\n### Running Tests\n\n    \u003e gem install jeweler\n    \u003e gem install webmock\n    \u003e rake spec\n\n## Configuration\n\nThe Client API library constructor supports a number of options that can\nbe provided as part of the optional 'opts' hash map to these methods:\n\n- `initialize`(apikey, opts={}) (constructor)\n- `Client.authenticate`(user, password, opts={}) (class method)\n- `Client.server_status`(opts={}) (class method)\n\n### Endpoint\n\nAdd the `:endpoint` key to the opts to provide an alternative endpoint to make\nthe API calls to. Examples are an alternate API endpoint or a static IP address\nprovided by Treasure Data on a case-by-case basis.\n\nThe default endpoint is:\n\n    https://api.treasuredata.com\n\nand configure communication using SSL encryption over HTTPS; the same happens\nevery time the provided endpoint is prefixed by 'https'.\n\nE.g.\n\n    opts.merge({:endpoint =\u003e \"https://api-alternate.treasuredata.com\"})\n\nThe endpoint can alternatively be provided by setting the `TD_API_SERVER`\nenvironment variable. The `:endpoint` option takes precedence over the\n`TD_API_SERVER` environment variable setting.\n\nFor communication through a Proxy, please see the Proxy option below.\n\n### Connection, Read, and Send Timeouts\n\nThe connection, read, and send timeouts can be provided via the\n`:connect_timeout`, `:read_timeout`, `:send_timeout` keys respectively.\nThe values for these keys is the number of seconds.\n\nE.g.\n\n    opts.merge({:connect_timeout =\u003e 60,\n                :read_timeout    =\u003e 60,\n                :send_timeout    =\u003e 60})\n\n### SSL\n\nThe `:ssl` key specifies whether SSL communication ought to be used when\ncommunicating with the default or custom endpoint.\n\nThis option is ignored if the endpoint (default or custom) URL specifies the\nscheme (e.g. the protocol, https or http) in which case SSL enabled/disabled is\ninferred directly from the URL scheme.\n\nE.g.\n\n    # SSL is enabled as specified by the :ssl option\n    opts.merge({:endpoint =\u003e \"api.treasuredata.com\", :ssl =\u003e true})\n\n    # the ssl option is ignored in this case\n    opts.merge({:endpoint =\u003e \"https://api.treasuredata.com\", :ssl =\u003e false})\n\n    # You can disable verification\n    opts.merge({:endpoint =\u003e \"https://api.treasuredata.com\", :verify =\u003e false})\n\n    # You can use your own certificate\n    opts.merge({:endpoint =\u003e \"https://api.treasuredata.com\", :verify =\u003e \"/path/to/cert\"})\n\n### Proxy\n\nIf your network requires accessing our endpoint through a proxy (anonymous or\nprivate), the proxy settings can be specified through the `:http_proxy` option.\n\nE.g.\n\n    # anonymous proxies\n    opts.merge({:http_proxy =\u003e \"http://myproxy.com:1234\"})\n    opts.merge({:http_proxy =\u003e \"myproxy.com:1234\"})\n\n    # private proxies\n    opts.merge({:http_proxy =\u003e \"https://username:password@myproxy.com:1234\"})\n    opts.merge({:http_proxy =\u003e \"username:password@myproxy.com:1234\"})\n\nThe proxy settings can alternatively be provided by setting the `HTTP_PROXY`\nenvironment variable. The `:http_proxy` option takes precedence over the\n`HTTP_PROXY` environment variable setting.\n\n### Additional Header(s)\n\nThe Ruby client configures the communication with the Treasure Data REST API\nendpoints using the required HTTP Headers (including authorization, Date,\nUser-Agent and Accept-Encoding, Content-Length, Content-Encoding where\napplicable) basing on what method call is made.\n\nThe user can specify any additional HTTP Header using the `:headers` option.\n\nE.g.\n\n    opts.merge({:headers =\u003e \"MyHeader: myheadervalue;\"})\n\nTo specify a custom User-Agent please see the option below.\n\n### Additional User-Agent(s)\n\nAdd the `:user_agent` key to the opts hash to provide an additional user agent\nfor all the interactions with the APIs.\nThe provided user agent string will be added to this default client library user\nagent `TD-Client-Ruby: X.Y.Z` where X.Y.Z is the version number of this Ruby\nClient library.\n\nE.g.\n\n    opts.merge({:user_agent =\u003e \"MyApp: A.B.C\"})\n\nwhich sets the user agent to:\n\n    \"MyApp: A.B.C; TD-Client-Ruby: X.Y.Z\"\n\n### Retry POST Requests\n\nAdd the `:retry_post_requests` key to the opts hash to require that every\nfailed POST request is retried for up to 10 minutes with an exponentially\ndoubling backoff window just as it happens for GET requests by default.\n\nNote that this can lead to unwanted results since POST request as not always\nidempotent, that is retrying a POST request by lead to the creation of\nduplicated resources, such as the submission of 2 identical jobs on failures.\n\nAs for GET requests, the retrying mechanism is triggered on 500+ HTTP error\ncodes or the raising of exceptions during the communication with the remote\nserver.\n\nE.g.\n\n    opts.merge({:retry_post_requests =\u003e true})\n\nto enable retrying for POST requests.\n\n## Testing Hooks\n\nThe client library implements several hooks to enable/disable/trigger special\nbehaviors. These hooks are triggered using environment variables:\n\n- Enable debugging mode:\n\n  `$ TD_CLIENT_DEBUG=1`\n\n  Currently debugging mode consists of:\n\n  - show request and response of `HTTP`/`HTTPS` `GET` REST API calls;\n  - show request of `HTTP`/`HTTPS` `POST`/`PUT` REST API calls.\n\n## More Information\n\n- Copyright: (c) 2011-2023 Treasure Data Inc.\n- License: Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-client-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreasure-data%2Ftd-client-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Ftd-client-ruby/lists"}