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

Release 1 #1

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you find something wrong in the docs or want to submit changes to the API ple

First, run `yarn` to install the dependencies.

Then, run `yarn dev` to start the development server and visit localhost:3000.
Then, run `yarn dev` to start the development server and visit localhost:4000.

## License

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remoet-docs",
"version": "0.0.1",
"version": "1.0.0",
"description": "Documentation for remoet.dev",
"scripts": {
"dev": "next dev -p 4000",
Expand Down
5 changes: 3 additions & 2 deletions pages/endpoints/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"hello": "GET: hello",
"get-me": "GET: get-me"
"hello": "GET/user/hello",
"full": "GET/user/full",
"links": "GET/user/links"
}
123 changes: 123 additions & 0 deletions pages/endpoints/full.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# `GET/user/full`

This endpoint returns all data you have entered into your profile.
It ignores any visibility setting, and returns everything we got.

## Basic
- type: `REST`
- method: `GET`
- url: https://api.remoet.dev/user/full
- returns: `JSON`

## cURL
```cURL
curl --location 'https://api.remoet.dev/user/full' --header 'Authorization: Bearer <Your key>'
```

## HTTP
```http
GET /user/full HTTP/1.1
Host: https://api.remoet.dev
Authorization: Bearer <Your key>
```

## Javacript Fetch
```javascript
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${key}`);

const requestOptions = {
method: "GET",
headers: myHeaders
};

fetch("https://api.remoet.dev/user/full", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
```

## Result
```json
{
"createdAt": <timestamp>,
"updatedAt": <timestamp>,
"ghId": <number>,
"email": <string>,
"profile": {
"updatedAt": <timestamp>,
"isPublic": <Boolean>,
"slug": <string | null>,
"name": {
"isPublic": <boolean>,
"value": <string | null>
},
"phone": {
"isPublic": <boolean>,
"value": <string | null>
},
"email": {
"isPublic": <boolean>,
"value": <string | null>
},
"url": {
"isPublic": <boolean>,
"value": <string | null>
},
"summary": {
"isPublic": <boolean>,
"value": <string | null>
},
"location": {
"isPublic": <boolean>,
"value": <string | null>
},
"githubUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"facebookUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"twitterUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"linkedinUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"youtubeUrl": {
"isPublic": <boolean>,
"value": <string | null>
}
},
"jobs": <array> [
{
"createdAt": <timestamp>,
"updatedAt": <timestamp>,
"title": <string>,
"startDate": <timestamp>,
"endDate": <timestamp | null>,
"isCurrent": <boolean>,
"isPublic": <boolean>,
"companyName": <string>,
"technologies": <array> [<string>],
"description": <string | null>,
"isRemote": <boolean>,
"companyUrl": <string>,
}
]
}
```

## Non authenticated response
```json
{
"statusCode": 401,
"message": "Invalid API Key",
"error": "Unauthorized"
}
```

1 change: 0 additions & 1 deletion pages/endpoints/get-me.mdx

This file was deleted.

40 changes: 32 additions & 8 deletions pages/endpoints/hello.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
# `GET: hello`
# `GET/user/hello`

The `/developers/hello` endpoint is a testing endpoint for veryfying that your authentication is setup correctly.
The `/user/hello` endpoint is a testing endpoint for veryfying that your authentication is setup correctly.
One might argue that any of the authenticated endpoints would suffice, but alas, this one exists as well.

## Basic
- type: `REST`
- method: `GET`
- url: https://api.remoet.dev/developers/hello
- url: https://api.remoet.dev/user/hello
- returns: `string`

cURL
## cURL
```cURL
curl --location 'https://api.remoet.dev/developers/hello' --header 'Authorization: Bearer <your-key>'
curl --location 'https://api.remoet.dev/user/hello' --header 'Authorization: Bearer <Your key>'
```

Result
## HTTP
```http
GET /user/hello HTTP/1.1
Host: https://api.remoet.dev
Authorization: Bearer <Your key>
```
Hello from the public API! <your-email>

## Javacript Fetch
```javascript
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${key}`);

const requestOptions = {
method: "GET",
headers: myHeaders
};

fetch("https://api.remoet.dev/user/hello", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
```

## Result
```
Hello from the public API! <Your email>
```

Not authenticated response
## Non authenticated response
```json
{
"statusCode": 401,
Expand Down
80 changes: 80 additions & 0 deletions pages/endpoints/links.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# `GET/user/links`

This endpoints returns all the link values you have entered or not entered into your profile.

## Basic
- type: `REST`
- method: `GET`
- url: https://api.remoet.dev/user/links
- returns: `JSON`

## cURL
```curl
curl --location 'https://api.remoet.dev/user/links' --header 'Authorization: Bearer <Your key>'
```

## HTTP
```http
GET /user/links HTTP/1.1
Host: https://api.remoet.dev
Authorization: Bearer <Your key>
```

## Javascript Fetch
```javascript
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${key}`);

const requestOptions = {
method: "GET",
headers: myHeaders
};

fetch("https://api.remoet.dev/user/links", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
```

## Result
### Note about data fields
Currently links and other data are stored together with an `isPublic` flag. This is a feature not yet implemented,
but it might be implemented in the future to gain access to very fine grain privacy settings.

```json
{
"url": {
"isPublic": <boolean>,
"value": <string | null>
},
"githubUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"facebookUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"twitterUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"linkedinUrl": {
"isPublic": <boolean>,
"value": <string | null>
},
"youtubeUrl": {
"isPublic": <boolean>,
"value": <string | null>
}
}
```

## Non authenticated response
```json
{
"statusCode": 401,
"message": "Invalid API Key",
"error": "Unauthorized"
}
```