{"id":13523800,"url":"https://github.com/tessus/yourls-json-response","last_synced_at":"2025-04-11T01:37:11.342Z","repository":{"id":41951522,"uuid":"130940107","full_name":"tessus/yourls-json-response","owner":"tessus","description":"Add .json (or a custom string/character) to the short URL to get info about it as a JSON response.","archived":false,"fork":false,"pushed_at":"2022-04-22T16:47:55.000Z","size":23,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T22:43:16.588Z","etag":null,"topics":["yourls-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tessus.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":"2018-04-25T02:32:52.000Z","updated_at":"2024-11-06T10:01:02.000Z","dependencies_parsed_at":"2022-08-12T00:22:46.320Z","dependency_job_id":null,"html_url":"https://github.com/tessus/yourls-json-response","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fyourls-json-response","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fyourls-json-response/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fyourls-json-response/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fyourls-json-response/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tessus","download_url":"https://codeload.github.com/tessus/yourls-json-response/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248326259,"owners_count":21085070,"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":["yourls-extension"],"created_at":"2024-08-01T06:01:03.814Z","updated_at":"2025-04-11T01:37:11.326Z","avatar_url":"https://github.com/tessus.png","language":"PHP","funding_links":[],"categories":["Plugins","PHP"],"sub_categories":["J"],"readme":"# JSON Response [![Listed in Awesome YOURLS!](https://img.shields.io/badge/Awesome-YOURLS-C5A3BE)](https://github.com/YOURLS/awesome-yourls/)\n\nPlugin for [YOURLS](http://yourls.org/).\n\nAdd .json (or a custom string/character) to the short URL to get info about it as a JSON response.\n\n## Installation\n\n1. Change to the `user/plugins` directory\n\t  - `git clone https://github.com/tessus/yourls-json-response.git json-response`\n  \n    \tor\n\t\n    - create a directory `json-response` and copy the [files of this repository](https://github.com/tessus/yourls-json-response/archive/master.zip) to it\n2. Activate the plugin (in your YOURLS admin page) \n\n## Configuration\n\nBy default the suffix `.json` is used. However, it is possible to use a different string or character.\n\nIn `config.php` add the following (to change the suffix to `.j`):\n\n```php\ndefine('TESSUS_JSON_TRIGGER', '\\.j');\n```\n\nPlease note that certain characters have to be escaped. The plugin uses a regex to search for the suffix. Therefore all characters that have a special meaning in the regex world will have to be escaped accordingly.\n\n## Usage\n\nJust add the JSON suffix to the short URL.\n\nThe JSON response consists of 4 keys: `url`, `title`, `keyword`, and `shorturl`. \n\n### Example\n\n```bash\n$ curl -s http://g0to.ca/cu2t8.json |jq\n{\n  \"url\": \"https://www.amazon.ca/hz/wishlist/ls/109NPR6TPF108?\u0026sort=default\",\n  \"title\": \"Helmut K. C. Tessarek's Wish List\",\n  \"keyword\": \"cu2t8\",\n  \"shorturl\": \"http://g0to.ca/cu2t8\"\n}\n```\n\n## License\n\nThis plugin is licensed under the terms of the GNU General Public License, version 3 (GPLv3).\nLicense conditions are included in [LICENSE](LICENSE) or can be found at the [GNU website](https://www.gnu.org/licenses/gpl.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftessus%2Fyourls-json-response","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftessus%2Fyourls-json-response","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftessus%2Fyourls-json-response/lists"}