Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vitorccs/yourls-api-save-by-keyword
YOURLS plugin which updates the long URL of an existing keyword, or creates a new short URL with the supplied keyword
https://github.com/vitorccs/yourls-api-save-by-keyword
yourls-plugin
Last synced: 14 days ago
JSON representation
YOURLS plugin which updates the long URL of an existing keyword, or creates a new short URL with the supplied keyword
- Host: GitHub
- URL: https://github.com/vitorccs/yourls-api-save-by-keyword
- Owner: vitorccs
- License: gpl-3.0
- Created: 2021-06-08T19:09:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T22:37:56.000Z (over 1 year ago)
- Last Synced: 2024-08-02T06:17:09.389Z (4 months ago)
- Topics: yourls-plugin
- Language: PHP
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Save By Keyword - API action to update the long URL of an existing keyword, or creates a new short URL. (Plugins / S)
README
yourls-api-save-by-keyword [![Listed in Awesome YOURLS!](https://img.shields.io/badge/Awesome-YOURLS-C5A3BE)](https://github.com/YOURLS/awesome-yourls/)
===================Adds a new action `save_by_keyword` to the [YOURLS API](https://yourls.org/#API).
This action either updates the long URL of an existing keyword, or creates a new short URL with the supplied keyword.
This plugin is useful when you prefer to determine your own keywords (e.g: `user-id-1`, `user-id-2`, `user-joe` etc) rather than letting YOURLS generating random ones (e.g: `a93al`, `n9sj8`, etc) and you need to keep their long URLs always up to date.
With this action, you may save up to three steps: check if an existing keyword already exists, then delete it, and then generating again under the same keyword.
The request parameters are:
```
username
password
action: "save_by_keyword"
format: "json"
url:
keyword:
title:
```**TIP:** In case you need to allow multiple short URLs for a same long URL, you need to set the parameter `YOURLS_UNIQUE_URLS` to `false`.
```php
# config.php
define( 'YOURLS_UNIQUE_URLS', false );
```# How to
* In `/user/plugins`, create a new folder named `yourls-api-save-by-keyword`
* Drop these files in that directory
* Go to the Plugins administration page and activate the plugin
* Have fun