Skip to content
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

Missmatch between post counts from /v1/tags/get and /v1/posts/all?tag=NAME #9

Open
marcoscheel opened this issue Jan 9, 2014 · 2 comments

Comments

@marcoscheel
Copy link

I have some issues renaming and during the investigation i tried to analyse and found out that the data of the diffrent api calls don't match. At the moment i'm sure it is not a "caching" issue. If tested running a powershell against the api se at the end of this text. My test was:

  • Get the tags using the /v1/tags/get url
    • Tag: SharePoint = Count: 268
    • Tag: Development = Count: 118
  • Get the posts for both tags using the /v1/posts/all?tag=NAME url and count the returned xml nodes
    • Posts: SharePoint = Count: 266
    • Posts: Development = Count: 100

Why are the numbers so different? I have about 10 or 15 tags showing this behaviour?

PowerShell 4.0 (Win 8)

$cred = Get-Credential
$req = Invoke-WebRequest -Uri "https://api.del.icio.us/v1/posts/all?tag=sharepoint&tag_separator=comma" -Credential $cred
$xml = [xml]$req.Content
$xml.posts.post.Count
#Result: 266

$reqTag = Invoke-WebRequest -Uri "https://api.del.icio.us/v1/tags/get" -Credential $cred
$xmlTag = [xml]$reqTag.Content
$xmlTag.tags.tag | ? { $_.tag -eq "sharepoint" }
#count                                                       tag
#-----                                                       ---
#268                                                         sharepoint

$req = Invoke-WebRequest -Uri "https://api.del.icio.us/v1/posts/all?tag=development&tag_separator=comma" -Credential $cred
$xml = [xml]$req.Content
$xml.posts.post.Count
#Result: 100

$reqTag = Invoke-WebRequest -Uri "https://api.del.icio.us/v1/tags/get" -Credential $cred
$xmlTag = [xml]$reqTag.Content
$xmlTag.tags.tag | ? { $_.tag -eq "development" }
#count                                                       tag
#-----                                                       ---
#118                                                         development
@vjkaruna
Copy link
Contributor

Hi Marcos -

Are you able to identify the links that are variable? There may be difference between how tags are parsed with spaces and commas, depending on when they were entered (before 3 years ago, or more recently when comma-separated tags were introduced.)

Vijay

@marcoscheel
Copy link
Author

I've tried to analyses but on my side I don't get any further. The TAGS api is only getting an count and not the actual posts. All other methods (using posts ALL and posts ALL using the tag filter) will give me a consistent count for the specific tag. Only the TAGS api will show different data as explained in my issue. Is it possible to have a look at my data from the "data" point of view?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants