RSS

(root)/packagedb/0.5.x : /docs/tagsAPI.rst (revision 615)

To get this branch, use:
bzr branch /bzr/packagedb/0.5.x
Line Revision Contents
1 436
==============
2
 New Tags API
3
==============
4
5
:Author: Ionuț Arțăriși
6 474.1.5
:Date: 19 Aug, 2009
7 436
:For Version: 0.5.x
8
9 474.1.5
The new tags (`/pkgdb/tag`) API will be used to tag Applications. These are a
10
wrapper on top of PackageBuild objects. Basically all the PackageBuilds with
11
the same name get tagged the same. (PackageBuild.name is a FK to
12
Application.name in the db).
13
PackageBuilds are specific rpms, they have a version, a release, an arch and
14
belong to a specific yum repository.
15 436
16
This API will be used by:
17 444
* the pkgdb in its views to allow FAS users to tag builds via the WebUI
18 436
* other Fedora Infrastructure services
19
20
.. contents::
21
22 474.1.5
---------
23
Languages
24
---------
25
26
Each tag belongs to a specific language. The same tag can exist in multiple
27
languages at the same time. Tags don't get translated through a l10n process,
28
instead they are entered through the pkgdb API. That way, different
29
cultures/languages will tag apps differently according to their local IT
30
culture.  
31
32
The language must be mentioned on
33
https://translate.fedoraproject.org/languages/ . Either the long language name
34
or the shortname is accepted by pkgdb. The default language for all methods is
35
'American English (en_US)'.
36
37
-------
38 436
Scoring
39 474.1.5
-------
40
41
By default, each application/tag combination has a score showing how many
42
times that specific combination was entered in the pkgdb. This score might
43
come in handy when rating tags or when drawing tagclouds.
44
45
---------------------
46
Application Retrieval
47
---------------------
48
49
The API can retrieve tags belonging to one or more applications provided as
50
arguments to the `tag/packages` method.
51
52
-------------------
53
Application Tagging
54
-------------------
55
56
Applications can be tagged by sending a set of `apps` and `tags`, followed by
57
a `language` to the `tag/add` method. PkgDB (postgresql) will automatically
58
score the tags on each app. If the app has already been tagged with that
59
specific tag, the score will be incremented, otherwise, the tag will first be
60
associated to the build and the score will be set to 1.
61
62
---------------------
63
Application Searching
64
---------------------
65
66
The `tag/search` method receives one or more `tags`, an `operator` (OR|AND)
67
and a `language`. If the operator is `OR` (default), the method will return
68
all apps that contain at least ONE of the tags; using the `AND` operator will
69
result in the method returning all apps that contain at least ALL of the tags.
70
71
------------------
72
Application Scores
73
------------------
74
75
The `tag/scores` method will return a dictionary of tag : score items
76
belonging to a given `application` given as argument. 

Loggerhead 1.18.1 is a web-based interface for Bazaar branches