Skip to content
This repository has been archived by the owner. It is now read-only.

Document API #59

Closed
pypingou opened this issue Feb 28, 2013 · 4 comments
Closed

Document API #59

pypingou opened this issue Feb 28, 2013 · 4 comments

Comments

@pypingou
Copy link
Member

@pypingou pypingou commented Feb 28, 2013

It would be nice to have some sort of documentation on the API, including how to tag a package, the score of the user logged and so on.

That might have an impact on issue #57 as to do tagging outside of the web-app will require login.

@pypingou
Copy link
Member Author

@pypingou pypingou commented Mar 5, 2013

Ok so the basic idea would be:

  • login
  • get next application (random)
    • pkgname
    • summary
    • icon
    • existing tags
  • get specific application
    • pkgname
    • summary
    • icon
    • existing tags
      (We could combine the two above in a /api/package/<Name=None>/ if Name is
      None -> random otherwise return the specific package)
  • send tag
    • pkgname
    • tags
  • vote on tag
    • pkgname
    • tag
  • get user score
    • username
    • score
  • get leaderboard
    • top 10 user with their score
    • position of user (if username provided)
    • position of user above (if username provided)
  • get statistics
    • get statistics as we already have in the website (key/value based)

You mention that the current API is broken into "Add tag" and "Vote on tag", maybe we should make sure that "Add tag" == "Vote on tag" if the tag already existed for that package.

@hughsie
Copy link

@hughsie hughsie commented Mar 7, 2013

I'm thinking of writing a couple of plugins for gnome-software that directly interface with fedora-tagger and FAS and the only thing I need is a way to do:

  • SubmitRating(firefox, 40%)
  • WhatIsTheRatingOf(firefox)
  • SubmitTag(firefox, "web-browser")
  • GetTags(firefox)

I'm just using percentages internall for ratings, but in the UI there will be 1-5 stars. If anyone could give me a code snippet that can do those few things I'll get writing. Thanks.

Richard.

@pypingou
Copy link
Member Author

@pypingou pypingou commented Apr 10, 2013

Fixed in the frontend branch

@ralphbean
Copy link

@ralphbean ralphbean commented Apr 10, 2013

@hughsie, just so you know you can see the api right now at http://209.132.184.171/api/

This will be deployed to staging and then production eventually where you'll be able to see it at https://apps.fedoraproject.org/tagger/api/

@ralphbean ralphbean closed this Apr 10, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.