Wir haben eine Instanz von WordPress bereitgestellt und eine installiert JSON-API-Plugin
Mit diesem Plug-in können Sie einfache HTTP-GET-Anforderungen wie die folgenden erstellen:
http://www.example.org/?json=get_recent_posts
http://www.example.org/?json=get_post&post_id=47
http://www.example.org/?json=get_tag_posts&tag_slug=banana
Und eine Antwort kommt in JSON zurück:
{ "status": "ok", "count": 1, "count_total": 1, "pages": 1, "posts": [
{...}}
My question is how should I go about making these types of requests (and then parsing the returned JSON) in my Rails app. I was about to get started just writing something from scratch but I imagine there’s some good existing tools out there to manage something like this. Basically I’ve never attempted connecting to an API when a Ruby-wrapper wasn’t already available. Can you help a noob with how to get started?