-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public API #5848
Public API #5848
Conversation
Wow thats awesome! |
@sebgie Am super excited about this! 💃 🎈 🍩 🎉 Whenever you have a sec, it would be great if you could update the description to have a section explaining what this PR gives users who are interested in our API and how to test it, with the TLDR; being read-only access to a set of public-data endpoints. Much excite 🎊 🎆 |
I have tested this PR with some basic requests. I simply added a script to a blog post and published it. This code will retrieve all tags from your blog and output them as a list.
The value for |
First person to show us a screenshot of their ajax-fetched tag list gets a 🍪 |
} | ||
|
||
if (origin && client && client.type === 'ua' | ||
&& (_.some(client.trustedDomains, {trusted_domain: origin}) || origin === url.parse(config.url).hostname)) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
I've taken this for a spin, and found a little bit of an issue 😐 This is probably in some spec somewhere & kinda makes sense, but jQuery's There is a |
refs TryGhost#4180 closes TryGhost#4181 - added client and user authentication - added authenticatePublic/authenticatePrivate as workaround for missing permissions - added domain validation - added CORS header for valid clients - merged authenticate.js and client-auth.js into auth.js - removed middleware/api-error-handlers.js - removed authentication middleware - added and updated tests
I've updated this PR. It is no possible to:
|
Just for future ref, my version of the code to fetch this
Trying to make the tags linkable made me realise it'd be desirable to expose our url-building code somehow. |
refs #4180
closes #4181
missing permissions