Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update APIv3 documentation with latest changes #5895

Merged
merged 12 commits into from Jul 16, 2019
Merged

Conversation

@humitos
Copy link
Member

@humitos humitos commented Jul 9, 2019

  • Added Redirects documentation
  • Remove Users documentation
  • Added Project Import documentation
  • Make sure the fields in the responses match the returned ones
  • Add a note inviting users to request for beta testing
@humitos humitos requested a review from Jul 9, 2019
docs/api/v3.rst Outdated
+++++++++++++++++++
Redirects allow the author to redirect an old URL of the documentation to a new one.
This is useful when pages are moved around in the structure of the documentation set.
See :doc:`user-defined-redirects` for more information.
Copy link
Member Author

@humitos humitos Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stsewd do you know why this does not work? We are doing exactly the same in the index.rst page.

Copy link
Member

@stsewd stsewd Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc role search for relative paths, here you need to search from an absolute path (:doc:`/user-defined-redirects

Copy link
Member Author

@humitos humitos Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@ericholscher ericholscher left a comment

Looks like good changes, just a few comments.

docs/api/v3.rst Outdated
"xafer",
"pradyunsg"
{
"created": "2010-10-23T18:12:31+00:00",
Copy link
Member

@ericholscher ericholscher Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to expose this data do we? I don't really see how it's useful.

Copy link
Member Author

@humitos humitos Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing it for now. We can add user's fields later if we consider without breaking anything.

-X POST \
-H "Authorization: Token <token>" https://readthedocs.org/api/v3/projects/ \
-H "Content-Type: application/json" \
-d @body.json
Copy link
Member

@ericholscher ericholscher Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also include a Python example?

Copy link
Member Author

@humitos humitos Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be pretty handy. I will create an issue for this to use tabs (Python + Slumber and cURL).

Copy link
Member Author

@humitos humitos Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue at #5935

+++++++++++++++++++
Redirects allow the author to redirect an old URL of the documentation to a new one.
This is useful when pages are moved around in the structure of the documentation set.
See :doc:`/user-defined-redirects` for more information.
Copy link
Member

@ericholscher ericholscher Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably put a similar description for all the resources (eg. Translations)

docs/api/v3.rst Outdated
:statuscode 400: Some field is invalid


Redirect destroy
Copy link
Member

@ericholscher ericholscher Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think delete is probably more common than destroy -- we should standardize on one.

Copy link
Member Author

@humitos humitos Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He, yeah. The verb is DELETE but DRF uses destroy so 🤷‍♂️

I think delete makes more sense here.

@humitos
Copy link
Member Author

@humitos humitos commented Jul 16, 2019

@ericholscher I made some changes to the PR. Feel free to merge if you consider that's ready. Otherwise, let me know.

@humitos humitos requested a review from ericholscher Jul 16, 2019
Copy link
Member

@ericholscher ericholscher left a comment

Looks good to me. 👍

@ericholscher ericholscher merged commit 9d3372e into master Jul 16, 2019
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the humitos/apiv3-docs branch Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants