API Version Testing Based on Query Schema
Abstract
In one embodiment, a method includes receiving, from a third-party system, a data query requesting data items to be retrieved from hierarchical graphs associated with a social-networking system, each of the hierarchical graphs comprising one or more nodes, the one or more nodes representing one or more data items, respectively, and each of the data items having a particular one of a plurality of data types, wherein the data query corresponds to a data structure of the specific data type of the requested data items, determining, for each of the requested data items, whether the third-party system is authorized to access the data item based on a privacy setting associated with the requested data item, retrieving, based on the determining, each of the data items the third-party system is authorized to access, and sending, to a third-party system in response to the data query, each of the authorized data items.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method comprising:
receiving, from a third-party system, a data query requesting one or more data items to be retrieved from one or more hierarchical graphs associated with a social-networking system, each of the hierarchical graphs comprising one or more nodes, the one or more nodes representing one or more data items, respectively, and each of the data items having a particular one of a plurality of data types, wherein the data query corresponds to a data structure of the specific data type of the requested data items; determining, for each of the one or more requested data items, whether the third-party system is authorized to access the data item based on a privacy setting associated with the requested data item; retrieving, based on the determining, each of the one or more data items the third-party system is authorized to access; and sending, to a third-party system in response to the data query, each of the one or more authorized data items.
2 . The method of claim 1 , wherein the retrieved data items are expressed in a JavaScript Object Notation (JSON) format.
3 . The method of claim 1 , wherein retrieving each of the one or more data items the third-party system is authorized to access comprises:
identifying one or more nodes representing one or more data items, respectively, each identified node representing a data item requested by the data query and having a privacy setting authorizing access to the third-party system; and retrieving the identified data items from the nodes hierarchical graphs based on the respective node.
4 . The method of claim 1 , wherein the data type has a hierarchical data structure.
5 . The method of claim 1 , further comprising:
receiving, from the third-party system, an introspection query requesting the data structure of the specific data type to be retrieved from the one or more hierarchical graphs associated with the social-networking system; and retrieving, using the introspection query, the data structure of the specific data type.
6 . The method of claim 5 , further comprising validating each of the retrieved data items.
7 . The method of claim 6 , wherein validating each of the retrieved data items comprises, for each retrieved data item:
determining whether the retrieved data item corresponds to the retrieved data structure; and discarding the retrieved data item if the retrieved data item does not correspond to the retrieved data structure.
8 . The method of claim 7 , wherein validating the retrieved data items is performed using a recursive parsing algorithm.
9 . The method of claim 5 , wherein the retrieved data structure of the specific data type comprises:
a definition for the specific data type, the definition specifying (1) a name and a description of the specific data type, and (2) for each of one or more fields of the retrieved data structure, a name and a description of the field.
10 . The method of claim 1 , further comprising accessing one or more of the hierarchical graphs by an API call.
11 . The method of claim 1 , wherein the hierarchical graphs comprise representations of data generated by the social-networking system.
12 . The method of claim 1 , wherein one or more of the data items is not associated with a privacy setting.
13 . The method of claim 1 , wherein each data item is associated with a particular privacy setting specified for the data item.
14 . The method of claim 1 , wherein the privacy setting associated with a particular data item is specified by an author of the particular data item.
15 . The method of claim 14 , wherein the author of the particular data item is a particular user of the social-networking system, and wherein the particular user uploaded the data item to the social-networking system.
16 . The method of claim 14 , wherein the author of the particular data item is an administrator of the social-networking system.
17 . One or more computer-readable non-transitory storage media embodying software that is operable when executed to:
receive, from a third-party system, a data query requesting one or more data items to be retrieved from one or more hierarchical graphs associated with a social-networking system, each of the hierarchical graphs comprising one or more nodes, the one or more nodes representing one or more data items, respectively, and each of the data items having a particular one of a plurality of data types, wherein the data query corresponds to a data structure of the specific data type of the requested data items; determine, for each of the one or more requested data items, whether the third-party system is authorized to access the data item based on a privacy setting associated with the requested data item; retrieve, based on the determining, each of the one or more data items the third-party system is authorized to access; and send, to a third-party system in response to the data query, each of the one or more authorized data items.
18 . The media of claim 17 , wherein retrieving each of the one or more data items the third-party system is authorized to access comprises:
identify one or more nodes representing one or more data items, respectively, each identified node representing a data item requested by the data query and having a privacy setting authorizing access to the third-party system; and retrieve the identified data items from the nodes hierarchical graphs based on the respective node
19 . A system comprising: one or more processors; and a memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to:
receive, from a third-party system, a data query requesting one or more data items to be retrieved from one or more hierarchical graphs associated with a social-networking system, each of the hierarchical graphs comprising one or more nodes, the one or more nodes representing one or more data items, respectively, and each of the data items having a particular one of a plurality of data types, wherein the data query corresponds to a data structure of the specific data type of the requested data items; determine, for each of the one or more requested data items, whether the third-party system is authorized to access the data item based on a privacy setting associated with the requested data item; retrieve, based on the determining, each of the one or more data items the third-party system is authorized to access; and send, to a third-party system in response to the data query, each of the one or more authorized data items.
20 . The system of claim 19 , wherein retrieving each of the one or more data items the third-party system is authorized to access comprises:
identify one or more nodes representing one or more data items, respectively, each identified node representing a data item requested by the data query and having a privacy setting authorizing access to the third-party system; and retrieve the identified data items from the nodes hierarchical graphs based on the respective nodeJoin the waitlist — get patent alerts
Track US2016306990A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.