Commit 40d597980f0fb4772522d084f1b92eedd9123de6
1 parent
fbe3335a
Exists in
master
and in
39 other branches
Updating open-data
Showing
1 changed file
with
18 additions
and
8 deletions
Show diff stats
src/templates/open-data.html
... | ... | @@ -17,31 +17,34 @@ |
17 | 17 | <ul class="list-unstyled"> |
18 | 18 | <li> |
19 | 19 | <p>{% trans "Each model listed below has a resource_uri field available, which is the object's data URI." %}</p> |
20 | - <p>{% trans "The following list contains the available models to retrieve data" %}:</p> | |
20 | + <p>{% trans "The following list contains the available models to retrieve data and its fields available for filtering" %}:</p> | |
21 | 21 | <ul> |
22 | 22 | <li> |
23 | 23 | <strong><a href="{{ BASE_API_URL }}user/">user</a></strong>: |
24 | - {% trans "Retrieve users with username, institution, role, twitter, facebook, google talk, github, webpage and bio" %} | |
24 | + {% trans "Fields" %}: <i>username, email, institution, role and bio</i> | |
25 | + <p><strong>{% trans "The email field is not shown for user's privacy, but you can filter through it" %}</strong></p> | |
25 | 26 | </li> |
26 | 27 | <li> |
27 | 28 | <strong><a href="{{ BASE_API_URL }}emailaddress/">emailaddress</a></strong>: |
28 | - {% trans "Retrieve emailaddress with user and real_name" %} | |
29 | + {% trans "Fields" %}: <i>user, address and real_name</i> | |
30 | + <p>{% trans "The user field is a foreign key for user objects and it can be null" %}</p> | |
29 | 31 | </li> |
30 | 32 | <li> |
31 | 33 | <strong><a href="{{ BASE_API_URL }}message/">message</a></strong>: |
32 | - {% trans "Retrieve messages with body, id, received_time and subject" %} | |
34 | + {% trans "Fields" %}: <i>from_address, body, id, received_time and subject</i> | |
35 | + <p>{% trans "The from_address field is a foreign key to emailaddress objects" %}</p> | |
33 | 36 | </li> |
34 | 37 | <li> |
35 | 38 | <strong><a href="{{ BASE_API_URL }}revision/">revision</a></strong>: |
36 | - {% trans "Retrieve revisions with author, created, key, message and repository_name" %} | |
39 | + {% trans "Fields" %}: <i>author, created, key, message and repository_name</i> | |
37 | 40 | </li> |
38 | 41 | <li> |
39 | 42 | <strong><a href="{{ BASE_API_URL }}ticket/">ticket</a></strong>: |
40 | - {% trans "Retrieve tickets with author, component, created, description, id, keywords, milestone, modified, modified_by, priority, reporter, severity, status, summary and version" %} | |
43 | + {% trans "Fields" %}: <i>author, component, created, description, id, keywords, milestone, modified, modified_by, priority, reporter, severity, status, summary and version</i> | |
41 | 44 | </li> |
42 | 45 | <li> |
43 | 46 | <strong><a href="{{ BASE_API_URL }}wiki/">wiki</a></strong>: |
44 | - {% trans "Retrieve wikis with author, created, modified, modified_by, name and wiki_text" %} | |
47 | + {% trans "Fields" %}: <i>author, created, modified, modified_by, name and wiki_text</i> | |
45 | 48 | </li> |
46 | 49 | </ul> |
47 | 50 | </li> |
... | ... | @@ -60,14 +63,21 @@ |
60 | 63 | {% trans "Where n is the index of the first result to appear in the page." %} |
61 | 64 | <i>{% trans "Default: 0" %}</i>. |
62 | 65 | </li> |
66 | + <li class="divider"><h3>{% trans "Filtering" %}:</h3></li> | |
63 | 67 | <li> |
64 | 68 | <h4><i>fieldname</i> - {% trans "The field name" %}</h4> |
65 | 69 | {% trans "If you are looking for a specific wiki, and you know the wiki's name, you can filter it as below" %} |
66 | 70 | <p><i>...{{ BASE_API_URL }}wiki/?name={% trans "WikiName" %}</i></p> |
67 | - {% trans "Where "name" is the fieldname and "WikiName" is the value you want to filter. You can also filter using Django lookup fields as below" %} | |
71 | + <p>{% trans "Where "name" is the fieldname and "WikiName" is the value you want to filter." %}</p> | |
72 | + <h4>{% trans "Usage" %}</h4> | |
73 | + <p>{% trans "You can also filter using Django lookup fields as below" %}</p> | |
68 | 74 | <p><i>...{{ BASE_API_URL }}wiki/?wiki_text__startswith={% trans "Wiki" %}</i></p> |
69 | 75 | <p><i>...{{ BASE_API_URL }}ticket/?author__endswith={% trans "test" %}</i></p> |
70 | 76 | <p><i>...{{ BASE_API_URL }}message/?body__contains={% trans "test" %}</i></p> |
77 | + <h4>{% trans "Usage with related models" %}</h4> | |
78 | + <p><i>...{{ BASE_API_URL }}message/?from_address__user__email=usermailexample@host.com</i></p> | |
79 | + <p><i>...{{ BASE_API_URL }}message/?from_address__real_name=Name</i></p> | |
80 | + <p><strong>{% trans "Note: email filters must be exact." %} </strong></p> | |
71 | 81 | </li> |
72 | 82 | </ul> |
73 | 83 | </div> | ... | ... |