{"id":22354284,"url":"https://github.com/jonmagic/twelve","last_synced_at":"2026-04-09T10:36:55.351Z","repository":{"id":2012761,"uuid":"2947736","full_name":"jonmagic/twelve","owner":"jonmagic","description":"This is an unofficial ruby client for the [Gauges API](http://get.gaug.es/documentation/api/). The end goal is a complete, simple, and intuitive ruby API for all things Gauges.","archived":false,"fork":false,"pushed_at":"2011-12-09T23:16:32.000Z","size":111,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-15T07:04:48.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-09T14:27:28.000Z","updated_at":"2024-02-23T16:05:14.000Z","dependencies_parsed_at":"2022-08-26T15:51:42.084Z","dependency_job_id":null,"html_url":"https://github.com/jonmagic/twelve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Ftwelve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Ftwelve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Ftwelve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonmagic%2Ftwelve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonmagic","download_url":"https://codeload.github.com/jonmagic/twelve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228114865,"owners_count":17871742,"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-12-04T13:12:12.454Z","updated_at":"2026-04-09T10:36:55.315Z","avatar_url":"https://github.com/jonmagic.png","language":"Ruby","readme":"Twelve (gauge)\n==================\n\nThis is an unofficial ruby client for the [Gauges API](http://get.gaug.es/documentation/api/). The end goal is a complete, simple, and intuitive ruby API for all things Gauges.\n\nInstallation\n------------\n\n    gem install twelve\n\nUsage\n-----\n\nInstantiate the client:\n\n    access_token = \"abcd1234\"\n    bfg = Twelve.new(access_token)\n\n### Your Information\n\nGet your information:\n\n    bfg.me\n\nUpdate your information:\n\n    bfg.me({\n      :first_name =\u003e \"John\",\n      :last_name =\u003e \"Doe\"\n    })\n\n### API Clients\n\nGet your API clients:\n\n    bfg.clients\n\nCreate an API client:\n\n    bfg.clients.create(:description =\u003e \"12 Gauge\")\n\nDelete an API client:\n\n    client_id = 'abcd1234'\n    bfg.clients(client_id).destroy\n\n### Gauges\n\nGet your gauges:\n\n    bfg.gauges\n\nCreate a gauge:\n\n    bfg.gauges.create({\n      :title =\u003e 'theprogrammingbutler.com',\n      :tz =\u003e 'Eastern Time (US \u0026 Canada)'\n    })\n\nGet a specific gauge:\n\n    gauge_id = 'abcd1234'\n    bfg.gauges(gauge_id)\n\nUpdate a gauge:\n\n    bfg.gauges('abcd1234', {\n      :title =\u003e 'Go get your guns'\n    })\n\nDelete a gauge:\n\n    bfg.gauges('abcd1234').destroy\n\n### Sharing\n\nList who a gauge is shared with:\n\n    bfg.gauges('abcd1234').shares\n\nShare a gauge:\n\n    bfg.gauges('abcd1234').share({:email =\u003e 'john@doe.com'})\n\nUn-share a gauge:\n\n    user_id = '4321dcba'\n    bfg.gauges('abcd1234').unshare(user_id)\n\n### Content\n\nGet today's top content for a gauge:\n\n    bfg.gauges('abcd1234').content\n\nGet the second page of top content for a gauge:\n\n    bfg.gauges('abcd1234').content(:page =\u003e 2)\n\nGet top content for a specific date of a gauge:\n\n    bfg.gauges('abcd1234').content('2011-12-9')\n\nGet the second page for a specific date:\n\n    bfg.gauges('abcd1234').content('2011-12-9', :page =\u003e 2)\n\n### Referrers\n\nGet today's referrers for a gauge:\n\n    bfg.gauges('abcd1234').referrers\n\nGet the second page of referrers for a gauge:\n\n    bfg.gauges('abcd1234').referrers(:page =\u003e 2)\n\nGet referrers for a specific date of a gauge:\n\n    bfg.gauges('abcd1234').referrers('2011-12-9')\n\nGet the second page for a specific date:\n\n    bfg.gauges('abcd1234').referrers('2011-12-9', :page =\u003e 2)\n\n### Trafic\n\nGet this month's traffic for a gauge:\n\n    bfg.gauges('abcd1234').traffic\n\nGet a specific month's traffic:\n\n    bfg.gauges('abcd1234').traffic('2011-10-1')\n\n### Resolutions\n\nGet this month's screen sizes for a gauge:\n\n    bfg.gauges('abcd1234').traffic\n\nGet a specific month's screen sizes:\n\n    bfg.gauges('abcd1234').traffic('2011-10-1')\n\n### Technology\n\nGet browsers and platforms for a gauge:\n\n    bfg.gauges('abcd1234').technology\n\nGet a specific month's technology:\n\n    bfg.gauges('abcd1234').technology('2011-10-1')\n\n### Search Terms\n\nGet today's search terms for a gauge:\n\n    bfg.gauges('abcd1234').terms\n\nGet the second page of search terms for a gauge:\n\n    bfg.gauges('abcd1234').terms(:page =\u003e 2)\n\nGet search terms for a specific date of a gauge:\n\n    bfg.gauges('abcd1234').terms('2011-12-9')\n\nGet the second page for a specific date:\n\n    bfg.gauges('abcd1234').terms('2011-12-9', :page =\u003e 2)\n\n### Search Engines\n\nGet search engines for a gauge:\n\n    bfg.gauges('abcd1234').engines\n\nGet a specific month's search engines:\n\n    bfg.gauges('abcd1234').engines('2011-10-1')\n\n### Locations\n\nGet this month's locations for a gauge:\n\n    bfg.gauges('abcd1234').locations\n\nGet a specific month's locations:\n\n    bfg.gauges('abcd1234').locations('2011-10-1')\n\nTesting\n-------\n\nThe test suite uses [VCR](https://github.com/myronmarston/vcr) to cache actual requests to the Gauges API in a directory called responses in the spec directory. In order for VCR to make and cache the actual calls to the Gauges API you will need to provide your Gauges access_token by placing it in a file named .access_token in the spec directory.\n\nTo run the tests for content, referrers, traffic, resolutions, technology, search terms, search engines, and locations, you will also need to have an id for a gauge that has been collecting data for at least two days. You place this gauge id in spec/.gauge_id and spec_helper will use it.\n\nThis file is ignored by git (see .gitignore) so you can commit any changes you make to the gem without having to worry about your token being released into the wild.\n\nNow run the test suite:\n\n    bundle\n    bundle exec rake\n\nCONTRIBUTE\n----------\n\nIf you'd like to hack on Twelve, start by forking the repo on GitHub:\n\nhttps://github.com/jonmagic/twelve\n\nThe best way to get your changes merged back into core is as follows:\n\n1. Clone down your fork\n1. Create a thoughtfully named topic branch to contain your change\n1. Hack away\n1. Add tests and make sure everything still passes by running `bundle exec rake`\n1. If you are adding new functionality, document it in the README\n1. Do not change the version number, we will do that on our end\n1. If necessary, rebase your commits into logical chunks, without errors\n1. Push the branch up to GitHub\n1. Send a pull request for your branch","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonmagic%2Ftwelve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonmagic%2Ftwelve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonmagic%2Ftwelve/lists"}