liberapay.com icon indicating copy to clipboard operation
liberapay.com copied to clipboard

Is there a public API to access data used by widgets?

Open sunknudsen opened this issue 2 years ago • 8 comments

First, thanks for Liberapay!

I would like to display custom progress bar on https://sunknudsen.com/donate.

Is there a public API to access data used by widgets such as how much one receives and one’s goal?

sunknudsen avatar Nov 23 '21 11:11 sunknudsen

Do you know about this page? https://liberapay.com/sunknudsen/widgets/

trebmuh avatar Nov 23 '21 13:11 trebmuh

@trebmuh Yes, thanks for sharing.

That is the page I was referring to when mentioning widgets.

I would love to pull raw data (perhaps in JSON format) vs widget so I can generate my own visuals.

sunknudsen avatar Nov 23 '21 14:11 sunknudsen

OK. I don't know more than that. Probably @Changaco will know and tell.

trebmuh avatar Nov 23 '21 14:11 trebmuh

https://liberapay.com/sunknudsen/public.json is what you're looking for.

To close this issue, we should at least add a link to the public.json endpoint in the Widgets page.

Changaco avatar Nov 24 '21 14:11 Changaco

Thanks @Changaco, this is exactly what I was looking for. 🙌

sunknudsen avatar Nov 24 '21 18:11 sunknudsen

@Changaco Hi ,I would like to work on this issue. Can you please elaborate where to add the link mentioned above?

Aayush987 avatar Jan 22 '22 05:01 Aayush987

@Aayush987 The Widgets page is the file www/%username/widgets/index.html.spt.

Changaco avatar Jan 23 '22 09:01 Changaco

@Changaco I just have to add link of that public.json file to widgets page .Thats it ,right? Or i have to write something also? Also assign me this issue

Aayush987 avatar Jan 23 '22 09:01 Aayush987