Skip to content

docs: add guide to using the api - #3

Open
arjun988 wants to merge 3 commits into
verifiable-presentation:trunkfrom
arjun988:patch-1
Open

docs: add guide to using the api#3
arjun988 wants to merge 3 commits into
verifiable-presentation:trunkfrom
arjun988:patch-1

Conversation

@arjun988

@arjun988 arjun988 commented Oct 12, 2022

Copy link
Copy Markdown

Closes #2

@gamemaker1 gamemaker1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @arjun988 for taking this up!

I've left a few comments with feedback on how we could improve this PR before merging it, please do take a look.

Comment thread docs/calling-the-api.md Outdated
Comment thread docs/calling-the-api.md
Comment thread docs/calling-the-api.md
Comment thread docs/calling-the-api.md
@gamemaker1

Copy link
Copy Markdown
Member

Hi @arjun988,

Thanks for adding the example cURL command, and the different responses the API returns.

Currently, the document does not have a proper structure (1) or proper formatting (2).

  1. Could you please structure it as follows:
## Title

### Overview

<a brief about what the API does, and the end goal of creating a DID document for Ramesh>

### APIs

#### Creating a DID Document

<explain what calling the API does, and what the expected response is>

##### Request

<add in the raw HTTP request, as well as the cURL and HTTPie commands>

##### Response

<add the responses>
  1. Please take a look at this guide on Markdown formatting, which is used in all .md files such as the calling-the-api.md file.

@arjun988
arjun988 requested a review from gamemaker1 October 17, 2022 16:24
Comment thread docs/calling-the-api.md
@@ -0,0 +1,166 @@
## CALLING THE API

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please capitalise only the first letter of each word.

Comment thread docs/calling-the-api.md
Comment on lines +3 to +4
### This API is used to generate and decentralized identity documents for all entities that are stored in a registry.
### These documents contain the ID of the entity they describe, as well as the assertion or verification methods used by the entity to sign and verify credentials or ### presentations (respectively) generated or issued by them. student creating a DID using their school-issued email address.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The ### is used to create a heading, whereas these two lines are just text. Please remove the ###.

Comment thread docs/calling-the-api.md
### API

#### Creating API document:
#### POST /identity

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
#### POST /identity
#### POST /identity

Comment thread docs/calling-the-api.md
Comment on lines +12 to +17
##### Request


`A student creating a DID using their school-issued email address could make the following request:

POST /identity HTTP/1.1`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
##### Request
`A student creating a DID using their school-issued email address could make the following request:
POST /identity HTTP/1.1`
##### Request
A student creating a DID using their school-issued email address could make the following request:
<add the triple ` here>
POST /identity HTTP/1.1

Comment thread docs/calling-the-api.md
}
}
```
//Post request body with curl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add this as a subheading and not a "comment":

Suggested change
//Post request body with curl
##### Post request body with curl

Comment thread docs/calling-the-api.md
4)The overhead/ header data is used as an identifier, and its sole purpose is to indicate the source and destination of the information being transmitted.


#### Response

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
#### Response
#### Response

Comment thread docs/calling-the-api.md
}]
}
}
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add some description here about the fields returned in the response, and what the user can do with it.

(See the readme, it already contains these details)

Comment thread docs/calling-the-api.md
}
```

//Error

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, please use headings and not "comments"

Comment thread docs/calling-the-api.md
//Error

```
1) Invalid Identitifier Type

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please move this outside the code block

Comment thread docs/calling-the-api.md
}

```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a couple of lines explaining each error and why it could have occurred.

@gamemaker1 gamemaker1 changed the title Created calling-the-api.md docs: add guide to using the api Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add guide to calling the API

2 participants