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: 23 days ago
JSON representation

A simple YOURLS API plugin for reporting URL stats (clicks) in a specific time period.

Lists

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).