{"id":16553233,"url":"https://github.com/allejo/phpsoda","last_synced_at":"2025-10-13T03:40:23.487Z","repository":{"id":31965719,"uuid":"35535768","full_name":"allejo/PhpSoda","owner":"allejo","description":"A Socrata Open Data API (SODA) client library for PHP","archived":false,"fork":false,"pushed_at":"2022-09-30T19:06:29.000Z","size":222,"stargazers_count":17,"open_issues_count":1,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-13T01:43:53.564Z","etag":null,"topics":["api-wrapper","php","socrata","socrata-api","socrata-library","soda"],"latest_commit_sha":null,"homepage":"https://allejo.dev/PhpSoda/","language":"PHP","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/allejo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-13T07:56:25.000Z","updated_at":"2023-09-08T16:57:37.000Z","dependencies_parsed_at":"2022-08-21T02:40:31.002Z","dependency_job_id":null,"html_url":"https://github.com/allejo/PhpSoda","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/allejo/PhpSoda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allejo%2FPhpSoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allejo%2FPhpSoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allejo%2FPhpSoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allejo%2FPhpSoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allejo","download_url":"https://codeload.github.com/allejo/PhpSoda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allejo%2FPhpSoda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013520,"owners_count":26085368,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-wrapper","php","socrata","socrata-api","socrata-library","soda"],"created_at":"2024-10-11T19:47:31.466Z","updated_at":"2025-10-13T03:40:23.453Z","avatar_url":"https://github.com/allejo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhpSoda \n\n[![Stable Release](https://img.shields.io/packagist/v/allejo/php-soda.svg)](https://packagist.org/packages/allejo/php-soda) \n[![Build Status](https://img.shields.io/travis/allejo/PhpSoda.svg)](https://travis-ci.org/allejo/PhpSoda) \n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/allejo/PhpSoda.svg?maxAge=2592000)](https://scrutinizer-ci.com/g/allejo/PhpSoda/) \n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/allejo/PhpSoda.svg?maxAge=2592000)](https://scrutinizer-ci.com/g/allejo/PhpSoda/)\n\nA PHP library for working with the [Socrata Open Data API](http://dev.socrata.com/docs/endpoints.html). Provided as an alternative to Socrata's official implementation, this library fills the short-comings of the official library by providing more functionality, a more object-oriented approach, documentation, and plenty of example code.\n\nThis library fully supports interacting with the Socrata Open Data API (SODA) by getting datasets, handling tokens, handling basic authentication, and OAuth2.0 tokens in order to write or modify datasets.\n\n## Requirements\n\n- PHP 5.6+\n\n## Installation\n\nThis library is available on Packagist as [`allejo/php-soda`](https://packagist.org/packages/allejo/php-soda), add it using [Composer](https://getcomposer.org/).\n\nYou're not using Composer? Don't worry, this library is also provided as a Phar archive for you include in your code. Get the latest Phar archive from our [Releases](https://github.com/allejo/PhpSoda/releases).\n\nCheck out our [wiki article](https://github.com/allejo/PhpSoda/wiki/Installation) if you require assistance with using this library.\n\n## Sample Usage\n\nHere are some quick examples on how PhpSoda works, but there's a lot more you can do. Check out our [wiki](https://github.com/allejo/PhpSoda/wiki) to see everything else.\n\n**Get a dataset**\n\n```php\n// Create a client with information about the API to handle tokens and authentication\n$sc = new SodaClient(\"opendata.socrata.com\");\n\n// Access a dataset based on the API end point\n$ds = new SodaDataset($sc, \"pkfj-5jsd\");\n\n// Create a SoqlQuery that will be used to filter out the results of a dataset\n$soql = new SoqlQuery();\n\n// Write a SoqlQuery naturally\n$soql-\u003eselect(\"date_posted\", \"state\", \"sample_type\")\n     -\u003ewhere(\"state = 'AR'\")\n     -\u003elimit(1);\n\n// Fetch the dataset into an associative array\n$results = $ds-\u003egetDataset($soql);\n```\n\n**Updating a dataset**\n\n```php\n// Create a client with information about the API to handle tokens and authentication\n$sc = new SodaClient(\"opendata.socrata.com\", \"\u003ctoken here\u003e\", \"email@example.com\", \"password\");\n\n// The dataset to upload\n$data = file_get_contents(\"dataset.json\");\n\n// Access a dataset based on the API end point\n$ds = new SodaDataset($sc, \"1234-abcd\");\n\n// To upsert a dataset\n$ds-\u003eupsert($data);\n\n// To replace a dataset\n$ds-\u003ereplace($data);\n```\n\nNote: This library supports writing directly to datasets with the Socrata Open Data API. For datasets with one or more data transformations applied to the schema through the Socrata Data Management Experience (the user interface for creating datasets), use the Socrata Data Management API to apply those same transformations to all updates. For more details on when to use SODA vs the Socrata Data Management API, see the [Data Management API documentation](https://socratapublishing.docs.apiary.io)\n\n## Getting Help\n\nTo get help, see if our [wiki](https://github.com/allejo/PhpSoda/wiki) has any information regarding your question. If the wiki can't help you, you may either [create an issue](https://github.com/allejo/PhpSoda/issues) or stop by IRC; I'm available on IRC as \"allejo\" so feel free to ping me. I recommend creating an issue in case others have the same question but for quick help, IRC works just fine.\n\nTo report a bug or request a feature, please submit an issue.\n\n### IRC\n\nChannel: **#socrata-soda**  \nNetwork: irc.freenode.net\n\n## Thank You\n\n- [Official Socrata PHP Library](https://github.com/socrata/soda-php)\n- [C# Socrata Library](https://github.com/CityofSantaMonica/SODA.NET)\n\n## License\n\n[MIT](https://github.com/allejo/PhpSoda/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallejo%2Fphpsoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallejo%2Fphpsoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallejo%2Fphpsoda/lists"}