Plugin for YOURLS 1.6+: Custom API Action
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
The API function returns click statistics that look something like this:
{"statusCode":200,"message":"success","url-stats-period":{"clicks":"1"}}
- In
/user/plugins
, create a new folder namedtime-period-clicks
. - Drop these files in that directory.
- Go to the Plugins administration page ( eg
http://sho.rt/admin/plugins.php
) and activate the plugin. - Have fun!
Released under the MIT License.