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

[TUTORIAL] APIs, REST and RESTful APIs. #303

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Adi-ti09
Copy link

This is a documentation by Group 3. This pr contains:
-What is API
-What is REST
-What are the benefits of RESTfuk APIs
-How do RESTful APIs work
-Client Request
-Authentication methods
-Server Response

@Adi-ti09 Adi-ti09 changed the title Tutorial document on APIs, REST and RESTful APIs. [TUTORIAL] APIs, REST and RESTful APIs. Apr 14, 2023
Copy link
Member

@anvithks anvithks left a comment

Choose a reason for hiding this comment

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

Good job @Adi-ti09 @AachalG @anupriyajaiswal13 @Anupama-19 .
Please check the review comments and update.

# How to use an API?
#### The steps to implement a new API include:

- Obtaining an API key. This is done by creating a verified account with the API provider.
Copy link
Member

Choose a reason for hiding this comment

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

Is this step specific to some API provider?

Copy link
Author

Choose a reason for hiding this comment

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

No Sir. These are general instructions. The user can choose an API based on their needs. For any API provider, the user creates an account with them and further obtains an API key.


- Set up an HTTP API client. This tool allows you to structure API requests easily using the API keys received.

- If you don’t have an API client, you can try to structure the request yourself in your browser by referring to the API documentation.
Copy link
Member

Choose a reason for hiding this comment

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

Which service is being used as a reference here?
Preferably use an open source service that allows public access to APIs

Copy link
Author

Choose a reason for hiding this comment

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

The steps mentioned are general steps that can be applied to any API. There is no specific service being referenced here. Many open source services allow public access to APIs, such as OpenWeatherMap, Twitter API, GitHub API, and Google Maps API. Should we mention all these public APIs as examples?

- The response body contains the resource representation. The server selects an appropriate representation format based on what the request headers contain.
- Clients can request information in XML or JSON formats, which define how the data is written in plain text. For example, if the client requests the name and age of a person named John, the server returns a JSON representation as follows:

'{"name":"John", "age":30}'
Copy link
Member

Choose a reason for hiding this comment

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

You can use a code block to display json.

{
    "name" : "John",
    "age" : 30
}

Copy link
Author

Choose a reason for hiding this comment

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

Done Sir


- They give more context about the response and include information such as the server, encoding, date, and content type.

### References:
Copy link
Member

Choose a reason for hiding this comment

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

Please provide the links to the documents where the content is sourced from to ensure proper references are given.

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.

5 participants