Closed TimCadieux closed 4 years ago
Hi @TimCadieux,
Depends on what you’re trying to do.
Taggings are for tagging/untagging individual feeds.
Tags are for renaming and deleting entire tag groups.
The ids are not meant to match up since they’re desperate resources, but you can match them based on the name.
On Oct 2, 2019, at 4:34 PM, TimCadieux notifications@github.com wrote:
Hello Ben, sorry to be so annoying...
i want to be able to categorize my feeds so i'm using tags, however I can't get the taggings endpoint to make sense to me.
I use this curl
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/tags.json
which returns [{"id":901,"name":"Blog"},{"id":106685,"name":"canada.ca"},{"id":447,"name":"Twitter"}] which is what i see in the FeedBin interface as well.
However when I run this curl
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/taggings.json
I get
[{"id":4532308,"feed_id":1674755,"name":"Twitter"},{"id":4532307,"feed_id":1674766,"name":"Twitter"},{"id":4532305,"feed_id":1674793,"name":"Twitter"}, {"id":4532304,"feed_id":806754,"name":"Blog"},{"id":4532300,"feed_id":1671857,"name":"canada.ca"},{"id":4532297,"feed_id":1671855,"name":"canada.ca"}] which doesn't include any of the IDs from the first call.
If i still try
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/taggings/447.json which i expect to return all the Twitter tags i get a 403.
Sorry, not clear what id I should be using?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I wanted to return, ex All the feeds in the Tag Group Twitter, from the above Example...from what I understood in a previous question you had answered to someone else, I need to return all the Feed_Id for the Tag Group Twitter, then query individually...just not clear on how to query on a specific Tag Group.
You would collect the feed_id for every tagging that has the name "Twitter." Use this to build a list of urls to fetch.
For example:
// Taggings
var taggings = [{"id":4532308,"feed_id":1674755,"name":"Twitter"},{"id":4532307,"feed_id":1674766,"name":"Twitter"},{"id":4532305,"feed_id":1674793,"name":"Twitter"},{"id":4532304,"feed_id":806754,"name":"Blog"},{"id":4532300,"feed_id":1671857,"name":"canada.ca"},{"id":4532297,"feed_id":1671855,"name":"canada.ca"}]
// Add a URL to the array if the tagging name is Twitter
var urls = []
taggings.forEach(function(tagging) {
if (tagging.name === "Twitter") {
urls.push(`https://api.feedbin.com/v2/feeds/${tagging.feed_id}/entries.json`)
}
})
This urls
now contains an array of URLs you could fetch to get all the entries tagged with "Twitter":
["https://api.feedbin.com/v2/feeds/1674755/entries.json", "https://api.feedbin.com/v2/feeds/1674766/entries.json", "https://api.feedbin.com/v2/feeds/1674793/entries.json"]
Thank you Ben, that's the direction I was headed but I assumed I should filter on an ID.
to be clear, the below array would require me to do a loop and do 3 EndPoint calls?
["https://api.feedbin.com/v2/feeds/1674755/entries.json", "https://api.feedbin.com/v2/feeds/1674766/entries.json", "https://api.feedbin.com/v2/feeds/1674793/entries.json"]
EDIT
I have i working using a loop, just want to know if there's another way. Otherwise this is resolved, thanx, loving your app!
Hello Ben, sorry to be so annoying...
i want to be able to categorize my feeds so i'm using tags, however I can't get the taggings endpoint to make sense to me.
I use this curl
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/tags.json
which returns
[{"id":901,"name":"Blog"},{"id":106685,"name":"canada.ca"},{"id":447,"name":"Twitter"}]
which is what i see in the FeedBin interface as well.However when I run this curl
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/taggings.json
I get
which doesn't include any of the IDs from the first call.
If i still try
curl --verbose --user "usr:pwd" https://api.feedbin.com/v2/taggings/447.json
which i expect to return all the Twitter tags i get a 403.Sorry, not clear what id I should be using?