Skip to content

Commit de260b6

Browse files
author
devsnowin
committed
initial commit 🎉
0 parents  commit de260b6

34 files changed

+22348
-0
lines changed

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/Demo/Example.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
Let's see an example
6+
7+
**POST** mail
8+
9+
#### Request URL
10+
11+
```
12+
https://devmailer.vercel.app/api/sendmail?apikey=j2hvs2@sh2872092ue12seQ3
13+
```
14+
15+
#### Response
16+
17+
**Status:** 200 Ok
18+
19+
```json
20+
{
21+
"message": "mail has been sent",
22+
"data": {
23+
"accepted": [
24+
"user@test.com"
25+
],
26+
"rejected": [],
27+
"envelopeTime": 169,
28+
"messageTime": 370,
29+
"messageSize": 347,
30+
"response": "250 2.0.0 OK 16728293766 a11-20020a05620a16cb00b006bb29d932e1sm221367966qkn.105 - gsmtp",
31+
"envelope": {
32+
"from": "service.devmailer@gmail.com",
33+
"to": [
34+
"user@test.com"
35+
]
36+
},
37+
"messageId": "<d82a679b-c26f-a5c6-5acf-20f9381301b5d@test.com>"
38+
}
39+
}
40+
```

docs/Demo/_category_.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "👀 Demo",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index"
6+
}
7+
}

docs/Guide/Authorization.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
#### Public Authorization
6+
7+
Most actions can be performed without requiring authentication from a specific user. For example, fetching, or sending a mail does not require a user to log in.
8+
9+
To authenticate requests in this way, pass your application’s access key via the query parameter:
10+
11+
```
12+
https://devmailer.vercel.app/api/sendmail?apikey=YOUR_API_KEY
13+
```
14+
15+
## <span>⚠️</span> Note:
16+
Keep your API key with you safely. You can access the API only through API key

docs/Guide/Mail.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
Send mail by providing the required parameters.
6+
7+
## End point
8+
9+
```
10+
https://devmailer.vercel.app/api
11+
```
12+
13+
## Send mail
14+
15+
Send a mail
16+
17+
```Request
18+
POST /sendmail
19+
```
20+
21+
#### Parameters
22+
23+
| param | Description | Required |
24+
| ------- | ------------------- | -------- |
25+
| from | Sender name | true |
26+
| to | Recevier email ID | true |
27+
| subject | Subject of the mail | true |
28+
| message | Body of the mail | true |
29+
30+
31+
## <span>⚠️</span>Note:
32+
Message can be <i><u>html</u></i>

docs/Guide/Rate Limiting.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
You can send 1000 requests per day.

docs/Guide/Schema.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
## Location
6+
7+
You can access API at https://devmailer.vercel.app/api
8+
9+
## Summary objects
10+
11+
When retrieving a list of objects, an abbreviated or summary version of that object is returned - i.e., a subset of its attributes. To get a full detailed version of that object, fetch it individually.
12+
13+
## HTTP Verbs
14+
15+
The DevMailer API uses HTTP verbs appropriate to each action.
16+
17+
| Verbs | Description |
18+
| ------ | -------------------- |
19+
| GET | Retrieving resources |
20+
| POST | Creating resources |
21+
| PUT | Updating resources |
22+
| DELETE | Deleting resources |
23+
24+
## Error
25+
26+
If an error occurs, whether on the server or client side, the error message(s) will be returned in as object. For example:
27+
28+
> Status Code: 400
29+
30+
```JSON
31+
{
32+
"message": "from, to, subject, body - these fields are required!",
33+
}
34+
```
35+
36+
| Common Status Codes | Description |
37+
| ------------------- | ----------------------------------------------------------------------- |
38+
| 200 - OK | Everything worked as expected |
39+
| 400 - Bad Request | The request was unacceptable, often due to missing a required parameter |
40+
| 401 - Unauthorized | Invalid Access Token |
41+
| 403 - Forbidden | Missing permissions to perform request |
42+
| 404 - Not Found | The requested resource doesn’t exist |
43+
| 500, 503 | Something went wrong on our end |

docs/Guide/_category_.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "📗 Guide",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index"
6+
}
7+
}

0 commit comments

Comments
 (0)