Expand the documentation for get_connection#400
Conversation
The field expansion feature of GraphAPI can be efficiently used through the 'fields' parameter of the get_connections method. This means that the user can obtain info from both the referenced edge in 'connection_name', and the node that is connected to 'object_id' through said edge. Doing so is very useful, as it can reduce the amount of calls to the API, and help the user access richer data through a simpler query. This information is not intuitively acquired from either the Facebook SDK for Python docs, or the GraphAPI reference guide.
martey
left a comment
There was a problem hiding this comment.
I think that this pull request is useful and that it makes the documentation clearer. The only changes I would request would be a hyperlink to the specific part of the Graph API documentation that explains field expansion, and fixing the seven errors that doc8 found:
docs/api.rst:174: D002 Trailing whitespace
docs/api.rst:175: D002 Trailing whitespace
docs/api.rst:176: D002 Trailing whitespace
docs/api.rst:177: D002 Trailing whitespace
docs/api.rst:189: D002 Trailing whitespace
docs/api.rst:174: D001 Line too long
docs/api.rst:178: D001 Line too long
| or more fields of the edge specified in connection_name, or one or more | ||
| fields/edges of the node connected to the given object_id by said edge. | ||
| This parameter allows for nested queries to the GraphAPI, supported by the | ||
| field expansion feature. See the GraphAPI docs for syntax and further examples. |
There was a problem hiding this comment.
I think a link to the specific section of the Graph API documentation would be useful here.
There was a problem hiding this comment.
Marty, I completely forgot about this simple request you had. Out of the blue my GitHub account popped in my mind and I have requested a pull with the changes you asked for. Thank you for this super useful SDK!
martey
left a comment
There was a problem hiding this comment.
Can you rebase your commits so that they use the latest master commit as a base? rebase -p master should do the trick.
This should allow the automated tests to run successfully.
The field expansion feature of GraphAPI can be efficiently used through the 'fields' parameter of the get_connections method. This means that the user can obtain info from both the referenced edge in 'connection_name', and the node that is connected to 'object_id' through said edge. Doing so is very useful, as it can reduce the amount of calls to the API, and help the user access richer data through a simpler query. This information is not intuitively acquired from either the Facebook SDK for Python docs, or the GraphAPI reference guide.