{"id":33983868,"url":"https://github.com/appoly/shopwired-php-sdk","last_synced_at":"2025-12-13T04:12:04.614Z","repository":{"id":37522028,"uuid":"262100038","full_name":"appoly/shopwired-php-sdk","owner":"appoly","description":"PHP SDK to interact with ShopWired","archived":false,"fork":false,"pushed_at":"2023-04-19T20:41:53.000Z","size":299,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-19T21:56:36.619Z","etag":null,"topics":["php","php-sdk","shopwired"],"latest_commit_sha":null,"homepage":"https://appoly.co.uk","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appoly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"appoly"}},"created_at":"2020-05-07T16:18:27.000Z","updated_at":"2022-03-17T17:08:24.000Z","dependencies_parsed_at":"2022-08-18T04:42:06.493Z","dependency_job_id":null,"html_url":"https://github.com/appoly/shopwired-php-sdk","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/appoly/shopwired-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appoly%2Fshopwired-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appoly%2Fshopwired-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appoly%2Fshopwired-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appoly%2Fshopwired-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appoly","download_url":"https://codeload.github.com/appoly/shopwired-php-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appoly%2Fshopwired-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27699697,"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-12-13T02:00:09.769Z","response_time":147,"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","php-sdk","shopwired"],"created_at":"2025-12-13T04:12:04.078Z","updated_at":"2025-12-13T04:12:04.606Z","avatar_url":"https://github.com/appoly.png","language":"PHP","readme":"# ShopWired PHP SDK\nPHP library to interact with ShopWired - https://www.shopwired.co.uk/\n\n# Usage\n## Installation\n\n```\ncomposer require appoly/shopwired-php-sdk\n```\n\n## Authentication\nIf using `.env` to handle environment variables, add:\n```\nSHOPWIRED_API_KEY=xxxxxxxx\nSHOPWIRED_SECRET=xxxxxxx\n```\nIf not:\n```\nimport Appoly\\ShopWiredPHPSDK\\ShopWiredClient;\n...\n\nShopWiredClient::setCredentials($api_key, $secret);\n```\n\n## Let's do something\nTo get all products:\n```\nimport Appoly\\ShopWiredPHPSDK\\Models\\Products\\Products;\n...\n\n$products = Products::all()\n\n```\n\n# Documentation\n\nThe classes and methods are based wholly on the endpoints available in the API: https://help.shopwired.co.uk/api/introduction/api-home\n\nEach class will have (up to) the following available functions:\n\n```\nProduct::all($options = []);\nProduct::get($id);\nProduct::count($options = []);\nProduct::update($id, $data);\nProduct::create($data);\nProduct::delete($id)\n```\n\n# Throttling (Enabled by default)\n\n*NOTE: THIS CAN CAUSE THREAD BLOCKING*\n\n(https://help.shopwired.co.uk/api/introduction/api-rate-limiting)\n\u003e We use the leaky bucket algorithm as a controller.\n\u003e \n\u003eThe leaky bucket algorithm allows for infrequent bursts of calls to the API, and allows your APP to continue to make an unlimited amount of calls over time.\n\u003e \n\u003e The bucket size is 40 and this cannot be exceeded at any given time. The leak rate is 2 calls per second that continually empty the bucket.\n\u003e \n\u003e If your APP averages 2 calls per second then it will never trip the 429 too many requests error.\n\u003e \n\u003e API calls will be processed almost instantaneously as long as there is room in your bucket. You can make quick bursts of API calls that exceed the leak rate as long as your average call rate does not exceed 2 calls per second.\n\n\nThis package, by default, will throttle your requests based on this algorithm and these parameters. This uses `sleep` to time requests once the limits are hit, will mean that thread may run slowly.\n\n## Requirements\n\nThe throttling requires redis, to implement the limit between different sessions.\n\n## Disable\n\nWarning: Disabling the throttling may cause the request to fail with `429 too many requests`.\n\nTo disable the throttling use:\n\n```\nShopWiredThrottle::disable();\n```\n\n","funding_links":["https://github.com/sponsors/appoly"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappoly%2Fshopwired-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappoly%2Fshopwired-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappoly%2Fshopwired-php-sdk/lists"}