{"id":21825944,"url":"https://github.com/paulchiu/yaspa","last_synced_at":"2025-10-12T15:35:50.557Z","repository":{"id":57036386,"uuid":"97350712","full_name":"paulchiu/yaspa","owner":"paulchiu","description":"Yet Another Shopify PHP API","archived":false,"fork":false,"pushed_at":"2017-11-12T19:47:01.000Z","size":348,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-21T06:50:03.242Z","etag":null,"topics":["php","shopify","shopify-api","shopify-php-api","shopify-sdk"],"latest_commit_sha":null,"homepage":null,"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/paulchiu.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":"2017-07-16T00:46:39.000Z","updated_at":"2018-05-30T18:20:27.000Z","dependencies_parsed_at":"2022-08-24T06:40:46.328Z","dependency_job_id":null,"html_url":"https://github.com/paulchiu/yaspa","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paulchiu/yaspa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulchiu%2Fyaspa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulchiu%2Fyaspa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulchiu%2Fyaspa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulchiu%2Fyaspa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulchiu","download_url":"https://codeload.github.com/paulchiu/yaspa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulchiu%2Fyaspa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011849,"owners_count":26085004,"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-12T02:00:06.719Z","response_time":53,"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":["php","shopify","shopify-api","shopify-php-api","shopify-sdk"],"created_at":"2024-11-27T18:03:03.344Z","updated_at":"2025-10-12T15:35:50.538Z","avatar_url":"https://github.com/paulchiu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet Another Shopify PHP API (yaspa)\n\n[![CircleCI](https://circleci.com/gh/paulchiu/yaspa/tree/master.svg?style=svg)](https://circleci.com/gh/paulchiu/yaspa/tree/master)\n\n## Installation\n\n*Do not install this library. It is currently under active development\nand is in no way stable.*\n\n## Purpose\n\nMost Shopify APIs appear to be thin wrappers around Guzzle that makes things\nslightly more convenient but still makes it feel like you are interacting with a\nREST API.\n\nThe goal of this project is to go one step beyond and provide something closer\nto a SDK whereby the library offers everything through PHP without the developer\nneeding to think too much about the REST API.\n\n## Examples\n\nThe following examples show how CRUD works with the API. For full documentation,\nsee the [Yaspa Gitbook][docs].\n\nPlease note that all examples utilise private authentication.\n\n### Create private authentication credentials\n\nCredentials are stored in a POPO (Plain Old PHP Object) model.\n\nAll other examples assume the presence of the following code.\n\n```php\nuse Yaspa\\Authentication\\Factory\\ApiCredentials;\nuse Yaspa\\Factory;\n\n$credentials = Factory::make(ApiCredentials::class)\n    -\u003emakePrivate(\n        'my-shop',\n        '4ac0000000000000000000000000035f',\n        '59c0000000000000000000000000007f'\n    );\n```\n\n### Create a customer\n\n```php\nuse Yaspa\\AdminApi\\Customer\\Builders\\CreateNewCustomerRequest;\nuse Yaspa\\AdminApi\\Customer\\CustomerService;\nuse Yaspa\\AdminApi\\Customer\\Models\\Customer;\nuse Yaspa\\Factory;\n\n// Prepare creation request\n$customer = (new Customer())\n    -\u003esetFirstName('Steve')\n    -\u003esetLastName('Lastnameson')\n    -\u003esetEmail(uniqid('steve-').'@example.com')\n    -\u003esetTags(['foo', 'bar'])\n    -\u003esetVerifiedEmail(true)\n    -\u003esetAcceptsMarketing(true);\n$request = Factory::make(CreateNewCustomerRequest::class)\n    -\u003ewithCredentials($credentials)\n    -\u003ewithCustomer($customer);\n\n// Create new customer, $newCustomer is a Customer model\n$service = Factory::make(CustomerService::class);\n$newCustomer = $service-\u003ecreateNewCustomer($request);\nvar_dump($newCustomer);\n```\n\n### Get all customers created in the past 7 days\n\n```php\nuse Yaspa\\AdminApi\\Customer\\Builders\\GetCustomersRequest;\nuse Yaspa\\AdminApi\\Customer\\CustomerService;\nuse Yaspa\\Factory;\n\n// Create request\n$request = Factory::make(GetCustomersRequest::class)\n    -\u003ewithCredentials($credentials)\n    -\u003ewithCreatedAtMin(new DateTime('-7 days'));\n\n// Get customers, $customers is an iterator\n$service = Factory::make(CustomerService::class);\n$customers = $service-\u003egetCustomers($request);\n\n// Loop through customers, each $customer is a Customer model\n// paging is automated\nforeach ($customers as $index =\u003e $customer) {\n    var_dump($customer);\n}\n```\n\n### Update a customer\n\n```php\nuse Yaspa\\AdminApi\\Customer\\Builders\\ModifyExistingCustomerRequest;\nuse Yaspa\\AdminApi\\Customer\\CustomerService;\nuse Yaspa\\Factory;\n\n// Create request\n$customerUpdates = (new Customer())\n    -\u003esetId(6820000675)\n    -\u003esetFirstName('Alice')\n$request = Factory::make(ModifyExistingCustomerRequest::class)\n    -\u003ewithCredentials($credentials)\n    -\u003ewithCustomer($customerUpdates);\n\n// Modify an existing customer, $modifiedCustomer is a Customer model\n$service = Factory::make(CustomerService::class);\n$modifiedCustomer = $service-\u003emodifyExistingCustomer($request);\nvar_dump($modifiedCustomer);\n```\n\n### Delete a customer\n\n```php\nuse Yaspa\\AdminApi\\Customer\\CustomerService;\nuse Yaspa\\Factory;\n\n// Delete an existing customer\n$service = Factory::make(CustomerService::class);\n$service-\u003edeleteCustomerById($credentials, 6820000675);\n```\n\n## Documentation\n\nFor full documentation, please see https://paulchiu.gitbooks.io/yaspa/content/\n\n[docs]: https://paulchiu.gitbooks.io/yaspa/content/\n\n## Roadmap\n\nSee [issue 10][iten] for the project roadmap and to do list.\n\n[iten]: https://github.com/paulchiu/yaspa/issues/10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulchiu%2Fyaspa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulchiu%2Fyaspa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulchiu%2Fyaspa/lists"}