{"id":17113270,"url":"https://github.com/kurenn/cic-rb","last_synced_at":"2025-07-24T18:32:57.123Z","repository":{"id":7062118,"uuid":"8345520","full_name":"kurenn/cic-rb","owner":"kurenn","description":"A library built in ruby to communicate with the CIC Api","archived":false,"fork":false,"pushed_at":"2017-12-06T15:58:59.000Z","size":26,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-11T10:58:01.884Z","etag":null,"topics":["api","cic","cic-api","gem","hashie","ruby","sdk"],"latest_commit_sha":null,"homepage":null,"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/kurenn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-21T22:33:14.000Z","updated_at":"2020-03-31T23:50:00.000Z","dependencies_parsed_at":"2022-07-30T09:18:08.833Z","dependency_job_id":null,"html_url":"https://github.com/kurenn/cic-rb","commit_stats":null,"previous_names":["icalialabs/cic-rb"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kurenn/cic-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurenn%2Fcic-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurenn%2Fcic-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurenn%2Fcic-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurenn%2Fcic-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurenn","download_url":"https://codeload.github.com/kurenn/cic-rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurenn%2Fcic-rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951831,"owners_count":23687986,"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":["api","cic","cic-api","gem","hashie","ruby","sdk"],"created_at":"2024-10-14T17:05:25.131Z","updated_at":"2025-07-24T18:32:56.778Z","avatar_url":"https://github.com/kurenn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code Climate](https://codeclimate.com/github/IcaliaLabs/cic-rb/badges/gpa.svg)](https://codeclimate.com/github/IcaliaLabs/cic-rb)\n[![Test Coverage](https://codeclimate.com/github/IcaliaLabs/cic-rb/badges/coverage.svg)](https://codeclimate.com/github/IcaliaLabs/cic-rb/coverage)\n[![Issue Count](https://codeclimate.com/github/IcaliaLabs/cic-rb/badges/issue_count.svg)](https://codeclimate.com/github/IcaliaLabs/cic-rb)\n\n# CIC Ruby Gem\n\ncic-rb is a client which communicates with the CIC API, and interact\nwith it\n\nIt was developed for usage in Ruby on Rails web applications, but it\nalso works as a standalone library\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n\tgem 'cic'\n\nLiving on the edge\n\n\tgem 'cic', git: 'git@github.com:IcaliaLabs/cic-rb.git'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cic \n\nRequest for reports \n---\n\n```ruby\t\nCic::Report.all\n```\t\nIt will output:\n```ruby\t\n#\u003cCic::Report:0x007fb0a0874f58\n  @attributes=\n   {\"ticket\"=\u003e\"#7LZA\",\n    \"content\"=\u003e\n     \"ACCIDENTE* en Vasconcelos lateral para tomar el t\\u00FAnel SP #mtyfollow 16:26 v\\u00EDa @Monitores_SPGG cc @SanPedroen72\",\n    \"state\"=\u003e\"read\",\n    \"created_at\"=\u003e\"2013-02-21T16:29:30-06:00\",\n    \"updated_at\"=\u003e\"2013-02-21T16:34:15-06:00\",\n    \"lat\"=\u003e\"25.65419634916782\",\n    \"lng\"=\u003e\"-100.33913254737848\",\n    \"is_public\"=\u003etrue,\n    \"votes\"=\u003e0,\n    \"stars\"=\u003e0.0,\n    \"address_detail\"=\u003e{...},\n    \"group\"=\u003e\"Vialidad y Transito (SS)\",\n    \"categories\"=\u003e[\"ACCIDENTE\"]},\n  @raw_attributes=\n   {\"ticket\"=\u003e\"#7LZA\",\n    \"content\"=\u003e\n     \"ACCIDENTE* en Vasconcelos lateral para tomar el t\\u00FAnel SP #mtyfollow 16:26 v\\u00EDa @Monitores_SPGG cc @SanPedroen72\",\n    \"state\"=\u003e\"read\",\n    \"created_at\"=\u003e\"2013-02-21T16:29:30-06:00\",\n    \"updated_at\"=\u003e\"2013-02-21T16:34:15-06:00\",\n    \"lat\"=\u003e\"25.65419634916782\",\n    \"lng\"=\u003e\"-100.33913254737848\",\n    \"is_public\"=\u003etrue,\n    \"votes\"=\u003e0,\n    \"stars\"=\u003e0.0,\n    \"address_detail\"=\u003e\n     {\"formatted_address\"=\u003e\n       \"Jos\\u00E9 Vasconcelos 419, Residencial San Agust\\u00EDn 1er Sector, 66260 San Pedro Garza Garc\\u00EDa, Nuevo Le\\u00F3n, Mexico\",\n      \"zipcode\"=\u003e\"66260\",\n      \"county\"=\u003e\n       {\"long_name\"=\u003e\"San Pedro Garza Garc\\u00EDa\",\n        \"short_name\"=\u003e\"San Pedro Garza Garc\\u00EDa\"},\n      \"state\"=\u003e{\"long_name\"=\u003e\"Nuevo Leon\", \"short_name\"=\u003e\"NL\"},\n      \"neighborhood\"=\u003e\n       {\"long_name\"=\u003e\"Residencial San Agust\\u00EDn 1er Sector\",\n        \"short_name\"=\u003e\"Residencial San Agust\\u00EDn 1er Sector\"}},\n    \"group\"=\u003e\"Vialidad y Transito (SS)\",\n    \"categories\"=\u003e[\"ACCIDENTE\"]}\u003e\n```\t\n\nWe have a where clause to embrace em all!\n\n```ruby\nCic::Report.where(for_group: 142)\n```\n\nHeads up!, the params you can send are, for_group, for_category, limit, until\n\nIt will have the same output as above.\n\t\t\nRequest for categories \n---\n\n```ruby\t\nCic::Category.all\n```\t\n\tIt will output:\n\t\n```ruby\t\n#\u003cCic::Category:0x007fb0a28e2d58\n  @attributes=\n   {\"id\"=\u003e420,\n    \"name\"=\u003e\"AVISOS\",\n    \"metadata\"=\u003efalse,\n    \"type\"=\u003e\"blackbox\",\n    \"group\"=\u003e[\"Comunidad\"]},\n  @raw_attributes=\n   {\"id\"=\u003e420,\n    \"name\"=\u003e\"AVISOS\",\n    \"metadata\"=\u003efalse,\n    \"type\"=\u003e\"blackbox\",\n    \"group\"=\u003e[\"Comunidad\"]}\u003e,\n#\u003cCic::Category:0x007fb0a28e2bf0\n  @attributes=\n   {\"id\"=\u003e412,\n    \"name\"=\u003e\"BACHE O VIA DA\\u00D1ADA\",\n    \"metadata\"=\u003efalse,\n    \"type\"=\u003e\"blackbox\",\n    \"group\"=\u003e[\"Servicios Publicos (CS)\"]},\n  @raw_attributes=\n   {\"id\"=\u003e412,\n    \"name\"=\u003e\"BACHE O VIA DA\\u00D1ADA\",\n    \"metadata\"=\u003efalse,\n    \"type\"=\u003e\"blackbox\",\n    \"group\"=\u003e[\"Servicios Publicos (CS)\"]}\u003e\n```\t\n\nRequest for groups \n---\n```ruby\t\nCic::Group.all\n```\t\n\tIt will output:\n\t\n```ruby\t\n#\u003cCic::Group:0x007fb0a1c1b610\n  @attributes=\n   {\"id\"=\u003e142, \"name\"=\u003e\"Asesorias Generales\", \"categories\"=\u003e[[\"OTROS\", 424]]},\n  @raw_attributes=\n   {\"id\"=\u003e142, \"name\"=\u003e\"Asesorias Generales\", \"categories\"=\u003e[[\"OTROS\", 424]]}\u003e,\n#\u003cCic::Group:0x007fb0a1c1b4f8\n  @attributes=\n   {\"id\"=\u003e258, \"name\"=\u003e\"CFE\", \"categories\"=\u003e[[\"FALTA ELECTRICIDAD\", 423]]},\n  @raw_attributes=\n   {\"id\"=\u003e258, \"name\"=\u003e\"CFE\", \"categories\"=\u003e[[\"FALTA ELECTRICIDAD\", 423]]}\u003e,\n```\t\n\n## Hashie that out!\n\nThanks to Hashie library you can access the report attributes by the key value and/or chaining them\n\t\n```ruby\t\nreport = Cic::Report.find('#Y1UI')\n\nreport.ticket\n#=\u003e '#Y1UI'\n\ncategory = Cic::Category.all.first\ncategory.name\n#=\u003e \"AVISOS\"\n\ngroup = Cic::Group.all.first\ngroup.name\n#=\u003e \"Asesorias Generales\"\n```\n\t\t\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Changelog\n\u003cul\u003e\n  \u003cli\u003eCurrent gem version 1.0.0\u003c/li\u003e\n  \u003cli\u003ePrevious gem version 0.0.1\u003c/li\u003e\n  \u003cli\u003eAdd post method to create reports\u003c/li\u003e\n\t\u003cli\u003eRefactor for code reuse\u003c/li\u003e\n\t\u003cli\u003eGET requests for all entities\u003c/li\u003e\n\u003c/ul\u003e\n\n\n## Devs\n\u003cul\u003e\n  \u003cli\u003eAbraham Kuri Vargas (@kurenn)\u003c/li\u003e\n\u003c/ul\u003e\n\n## Future\n\u003cul\u003e\n  \u003cli\u003eAdd post method to create reports\u003c/li\u003e\n\u003c/ul\u003e\n\n\n## Credits\nIcalia Labs - weare@icalialabs.com\n\n[Follow us](http://twitter.com/icalialabs \"Follow us\")\n\n\n[Like us on Facebook](https://www.facebook.com/icalialab \"Like us on Facebook\")\n\n## License\nCopyright (c) 2011 Icalia Labs\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl.html.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurenn%2Fcic-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurenn%2Fcic-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurenn%2Fcic-rb/lists"}