oceanprotocol-archive / oceandao-proposal-portal

OceanDao proposal portal
0 stars 1 forks source link

Ocean Pearl: Access to full-text proposals #188

Open idiom-bytes opened 2 years ago

idiom-bytes commented 2 years ago

Preferred:

Candidate Ideas:

  1. Query the discourse API to get md post. This does not require an API key.
  2. Use the API to access descriptions. Markdown is stored as HTML (which can be transformed to .md)

Candidate solutions for Idea #2: A) Route to yield proposal/project data based on AirtableID (both Pearl + Ocean have access to this info) B) Register projectId and proposalId into Airtable, and projects can use this data to access this information

idiom-bytes commented 2 years ago

Sample Curl to get post based on postId https://port.oceanprotocol.com/posts/5019.json

Sample Curl to get latest information: curl -X GET "https://port.oceanprotocol.com/latest.json" -H "Content-Type: application/json" | jq . | less

marhali commented 2 years ago

Got it working with https://port.oceanprotocol.com/t/[topic-id].json (topic-id can be retrieved from the last part of the URL from a post in port) (this response only contains the HTML rendered body 😢 )

The response contains the post-id which can be used to call: https://port.oceanprotocol.com/posts/[post-id].json (this reponse contains the raw Markdown body)