Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rinogo/yourls-time-period-clicks
A simple YOURLS API plugin for reporting URL stats (clicks) in a specific time period.
https://github.com/rinogo/yourls-time-period-clicks
Last synced: 2 months ago
JSON representation
A simple YOURLS API plugin for reporting URL stats (clicks) in a specific time period.
- Host: GitHub
- URL: https://github.com/rinogo/yourls-time-period-clicks
- Owner: rinogo
- License: mit
- Created: 2018-10-22T16:43:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T07:55:28.000Z (about 4 years ago)
- Last Synced: 2024-08-02T06:17:36.813Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Time-Period Clicks - A simple API plugin for reporting URL clicks in a specific time period (e.g. the last week, January 1 - February 1, etc). (Plugins / T)
README
Plugin for YOURLS 1.6+: Custom API Action
# Description
Request stats (clicks) for a `url` or `shorturl` (required) between `since` (optional) and `until` (optional) using something like the following:
`https://sho.rt/yourls-api.php?username=xxxxx&password=yyyyy&format=json&action=url-stats-period&shorturl=abc&since=1540234300&until=1540234309`# Return value
The API function returns click statistics that look something like this:
```json
{"statusCode":200,"message":"success","url-stats-period":{"clicks":"1"}}
```# Installation
1. In `/user/plugins`, create a new folder named `time-period-clicks`.
2. Drop these files in that directory.
3. Go to the Plugins administration page ( *eg* `http://sho.rt/admin/plugins.php` ) and activate the plugin.
4. Have fun!# License
Released under the [MIT License](https://opensource.org/licenses/MIT).