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

Document API #59

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

Comments

Projects
None yet
3 participants
@pypingou
Member

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

This comment has been minimized.

Show comment
Hide comment
@pypingou

pypingou Mar 5, 2013

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@hughsie

hughsie 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.

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

This comment has been minimized.

Show comment
Hide comment
@pypingou

pypingou Apr 10, 2013

Member

Fixed in the frontend branch

Member

pypingou commented Apr 10, 2013

Fixed in the frontend branch

@ralphbean

This comment has been minimized.

Show comment
Hide comment
@ralphbean

ralphbean 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 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 join this conversation on GitHub. Already have an account? Sign in to comment