Difference between revisions of "Talk:AurJson"

From ArchWiki
Jump to: navigation, search
(Created page with "Is there a rate-limit on queries to the JSON interface I should abide by? ~~~~")
 
(Official name: new discussion)
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
== Rate limit ==
 +
 
Is there a rate-limit on queries to the JSON interface I should abide by? [[User:Fukawi2|Fukawi2]] ([[User talk:Fukawi2|talk]]) 05:06, 25 March 2013 (UTC)
 
Is there a rate-limit on queries to the JSON interface I should abide by? [[User:Fukawi2|Fukawi2]] ([[User talk:Fukawi2|talk]]) 05:06, 25 March 2013 (UTC)
 +
 +
==<s> Incorrect info[results] </s>==
 +
 +
I think the given example under "API Usage -> Query Types -> info" is incorrect. Shouldn't the "result" type be an array of objects, and shouldn't there be commas between members? [[User:Mikesteele81|Mikesteele81]] ([[User talk:Mikesteele81|talk]])
 +
 +
: I think this has been fixed in the latest version. I guess you were talking about [https://wiki.archlinux.org/index.php/AurJson?oldid=249664#info_2 this section], and in the current version [[AurJson#info 2]] it's fixed. --[[User:Franklin Yu|Franklin Yu]] ([[User talk:Franklin Yu|talk]]) 08:22, 21 April 2017 (UTC)
 +
 +
::Yes, this was fixed by [https://wiki.archlinux.org/index.php?title=AurJson&diff=next&oldid=420788], thanks, closed. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:20, 22 April 2017 (UTC)
 +
 +
== <s>Style of links and responses</s> ==
 +
 +
Should the style of links and responses follow [[Help:Style/Formatting and punctuation#Pseudo-variables in file/command line contents]]? For example, I think the link
 +
/rpc/?v=5&type=search&by=field&arg=keywords
 +
should be
 +
/rpc/?v=5&type=search&by=''field''&arg=''keywords''
 +
and the JSON response
 +
{"version":5,"type":"ReturnType","resultcount":0,"results":ReturnData}
 +
should be
 +
{"version":5,"type":''ReturnType'',"resultcount":0,"results":''ReturnData''}
 +
is that true? --[[User:Franklin Yu|Franklin Yu]] ([[User talk:Franklin Yu|talk]]) 07:55, 21 April 2017 (UTC)
 +
 +
:Yep, you got it right, also all those bold references should be fixed for example:
 +
 +
----
 +
 +
'''Return types'''
 +
 +
The return payload is of one format, and currently has three main types. The response will always return a type so that the user can determine if the result of an operation was an error or not.
 +
 +
The format of the return payload is:
 +
{"version":5,"type":''ReturnType'',"resultcount":0,"results":''ReturnData''}
 +
 +
{{ic|''ReturnType''}} is a string, and the value is one of:
 +
 +
* {{ic|search}}
 +
* {{ic|multiinfo}}
 +
* {{ic|error}}
 +
 +
The type of {{ic|''ReturnData''}} is an array of dictionary objects for the {{ic|search}} and {{ic|multiinfo}} {{ic|''ReturnType''}}, and an empty array for {{ic|error}} {{ic|''ReturnType''}}.
 +
 +
----
 +
 +
:— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:28, 22 April 2017 (UTC)
 +
 +
:: I'm thinking about quotes around strings, like
 +
 +
----
 +
 +
{{ic|''ReturnType''}} is a string, and the value is one of:
 +
 +
* {{ic|"search"}}
 +
* {{ic|"multiinfo"}}
 +
* {{ic|"error"}}
 +
 +
The type of {{ic|''ReturnData''}} is an array of dictionary objects for the {{ic|"search"}} and {{ic|"multiinfo"}} {{ic|''ReturnType''}}, and an empty array for {{ic|"error"}} {{ic|''ReturnType''}}.
 +
 +
----
 +
 +
:: --[[User:Franklin Yu|Franklin Yu]] ([[User talk:Franklin Yu|talk]]) 20:37, 22 April 2017 (UTC)
 +
 +
:::Hmm technically quotes aren't part of the value, but just JSON syntax, and also it's not common to quote monospaced text in this wiki, so I would avoid them. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:54, 23 April 2017 (UTC)
 +
 +
:: How about parameter key in query string? For example,
 +
 +
----
 +
 +
/rpc/?v=5&type=search&by=''field''&arg=''keywords''
 +
 +
…The {{ic|by}} parameter can be skipped and defaults to {{ic|name-desc}}…
 +
 +
----
 +
 +
:: Should it be {{ic|by}}, {{ic|'''by'''}} or {{ic|''by''}}? Or anything else? --[[User:Franklin Yu|Franklin Yu]] ([[User talk:Franklin Yu|talk]]) 05:41, 23 April 2017 (UTC)
 +
 +
:::{{ic|by}} is a parameter which appears literally in the actual query string, so it falls under [[Help:Style/Formatting_and_punctuation#Configuration_parameters.2C_variables.2C_options.2C_properties...]] and should be {{ic|plain_monospace}}.
 +
:::{{ic|''ReturnType''}} etc. are placeholders which don't appear literally in the query string or the response message: these are regulated by [[Help:Reading#Pseudo-variables_in_code_examples]] and [[Help:Style/Formatting_and_punctuation#Pseudo-variables_in_file.2Fcommand_line_contents]] and require {{ic|''italic_monospace''}}.
 +
:::— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 07:57, 23 April 2017 (UTC)
 +
 +
:::: Done. Hope I got it right. --[[User:Franklin Yu|Franklin Yu]] ([[User talk:Franklin Yu|talk]]) 08:34, 23 April 2017 (UTC)
 +
 +
:::::Very well done mate, thanks! — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:42, 23 April 2017 (UTC)
 +
 +
== Official name ==
 +
 +
[https://aur.archlinux.org/rpc.php] is titled "aurweb RPC Interface": is it only us here left calling this "AurJson"? In that case we should rename the article. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:44, 23 April 2017 (UTC)

Latest revision as of 10:45, 23 April 2017

Rate limit

Is there a rate-limit on queries to the JSON interface I should abide by? Fukawi2 (talk) 05:06, 25 March 2013 (UTC)

Incorrect info[results]

I think the given example under "API Usage -> Query Types -> info" is incorrect. Shouldn't the "result" type be an array of objects, and shouldn't there be commas between members? Mikesteele81 (talk)

I think this has been fixed in the latest version. I guess you were talking about this section, and in the current version AurJson#info 2 it's fixed. --Franklin Yu (talk) 08:22, 21 April 2017 (UTC)
Yes, this was fixed by [1], thanks, closed. — Kynikos (talk) 02:20, 22 April 2017 (UTC)

Style of links and responses

Should the style of links and responses follow Help:Style/Formatting and punctuation#Pseudo-variables in file/command line contents? For example, I think the link

/rpc/?v=5&type=search&by=field&arg=keywords

should be

/rpc/?v=5&type=search&by=field&arg=keywords

and the JSON response

{"version":5,"type":"ReturnType","resultcount":0,"results":ReturnData}

should be

{"version":5,"type":ReturnType,"resultcount":0,"results":ReturnData}

is that true? --Franklin Yu (talk) 07:55, 21 April 2017 (UTC)

Yep, you got it right, also all those bold references should be fixed for example:

Return types

The return payload is of one format, and currently has three main types. The response will always return a type so that the user can determine if the result of an operation was an error or not.

The format of the return payload is:

{"version":5,"type":ReturnType,"resultcount":0,"results":ReturnData}

ReturnType is a string, and the value is one of:

  • search
  • multiinfo
  • error

The type of ReturnData is an array of dictionary objects for the search and multiinfo ReturnType, and an empty array for error ReturnType.


Kynikos (talk) 02:28, 22 April 2017 (UTC)
I'm thinking about quotes around strings, like

ReturnType is a string, and the value is one of:

  • "search"
  • "multiinfo"
  • "error"

The type of ReturnData is an array of dictionary objects for the "search" and "multiinfo" ReturnType, and an empty array for "error" ReturnType.


--Franklin Yu (talk) 20:37, 22 April 2017 (UTC)
Hmm technically quotes aren't part of the value, but just JSON syntax, and also it's not common to quote monospaced text in this wiki, so I would avoid them. — Kynikos (talk) 02:54, 23 April 2017 (UTC)
How about parameter key in query string? For example,

/rpc/?v=5&type=search&by=field&arg=keywords

…The by parameter can be skipped and defaults to name-desc


Should it be by, by or by? Or anything else? --Franklin Yu (talk) 05:41, 23 April 2017 (UTC)
by is a parameter which appears literally in the actual query string, so it falls under Help:Style/Formatting_and_punctuation#Configuration_parameters.2C_variables.2C_options.2C_properties... and should be plain_monospace.
ReturnType etc. are placeholders which don't appear literally in the query string or the response message: these are regulated by Help:Reading#Pseudo-variables_in_code_examples and Help:Style/Formatting_and_punctuation#Pseudo-variables_in_file.2Fcommand_line_contents and require italic_monospace.
Kynikos (talk) 07:57, 23 April 2017 (UTC)
Done. Hope I got it right. --Franklin Yu (talk) 08:34, 23 April 2017 (UTC)
Very well done mate, thanks! — Kynikos (talk) 10:42, 23 April 2017 (UTC)

Official name

[2] is titled "aurweb RPC Interface": is it only us here left calling this "AurJson"? In that case we should rename the article. — Kynikos (talk) 10:44, 23 April 2017 (UTC)