{"id":17122208,"url":"https://github.com/ashander/scram","last_synced_at":"2025-03-24T02:46:47.800Z","repository":{"id":142804310,"uuid":"53752629","full_name":"ashander/scram","owner":"ashander","description":"scram: sacramento county retriever and munger","archived":false,"fork":false,"pushed_at":"2016-03-21T17:31:16.000Z","size":20,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T11:44:43.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/scram","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashander.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-12T20:47:01.000Z","updated_at":"2016-03-13T08:57:37.000Z","dependencies_parsed_at":"2023-03-22T02:33:10.075Z","dependency_job_id":null,"html_url":"https://github.com/ashander/scram","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashander%2Fscram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashander%2Fscram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashander%2Fscram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashander%2Fscram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashander","download_url":"https://codeload.github.com/ashander/scram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245200675,"owners_count":20576673,"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-10-14T18:06:47.832Z","updated_at":"2025-03-24T02:46:47.778Z","avatar_url":"https://github.com/ashander.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"scram: sacramento county retriever and munger\n\nwrapping the Sacramento County Open Data api\n\n[![NPM](https://nodei.co/npm/scram.png)](https://nodei.co/npm/scram/)\n\nUse:\n\n- `$ npm install scram`\n- visit http://data.saccounty.net/developers/ and obtain an API key\n\n```js\nvar scram = import(scram)\nscram.apiKey = '21235avalidapikey142' //note the quotes\n//scram.resouce = 'datastreams' // the default value, but change it...\n\n// a stream of guids\nscram.available()\n\n//stream info to stdout by default, or pass custom callback as last arg\nscram.info(guid)\n\n// stream 3 results from data to stdout by default, or pass custom callback as last arg\nscram.data(guid, 3)\n```\n\n\nThe API provides several types of resources (datastreams, datasets,\nvisualizations, and dashboards). By default, the only looks at datastreams.\nThis can be changed by modifying the `RESOURCES` variable in `.env`.\n\n## Module\n\nThe module provides three functions:\n\n - available() :\n     stream the guids available in datastreams to process.stdout\n - info(guid, infoProcessor):\n     print info about a guid (or process with a custom callback function\n     infoProcessor)\n - data(guid, limit=50, streamProcessor):\n     stream data from guid to process.stdout (or process with a custom\n     callback function streamProcessor)\n\n## Command line\n\nThe module also provides a wrapper for command-line interaction, `scram-cli`.\nIt's set up to populate api key and default resource from a .env file.\n\n### Setup\n\n- `npm install scram` and `npm link scram`, which will put `scram-cli` in your\n  path (and install scram globally)\n- copy or simlink bin/.env to the working directory where you\n  will use the script\n```sh\n$ ln -s $(npm prefix -g)/lib/node_modules/scram/bin/.env .\n```\n\n- open .env and edit the line below so after the = is the API key\n  obtained from http://data.saccounty.net/developers/. Note no quotes here.\n\n```sh\nSAC_API_KEY=21235avalidapikey142\n```\n\n### Use\nInteract with the api from the command line!\n\nPrint help,\n```sh\n$ scram-cli -h\n```\nList all GUIDs in the current resource (defined in `.env`),\n```sh\n$ scram-cli\n```\n\nQuery info (metadata) on a GUID\n```sh\n$ scram-cli info GUID\n```\n\nStream data from a GUID\n```sh\n$ scram-cli data GUID\n```\n\n\n## Contributing\n- Fork on github ( https://github.com/ashander/scram/fork )\n- Create a branch with a good name (`git checkout -b my-new-feature`)\n- Commit your changes (`git commit -am 'Add some feature'`)\n- Push the branch (`git push origin -u my-new-feature`)\n- Create a new Pull Request on github\n\n## Errata\nNote: versions before 0.3.0 mistakenly contained an api key and have been\nunpublished.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashander%2Fscram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashander%2Fscram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashander%2Fscram/lists"}