Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anegg0 committed Aug 5, 2022
0 parents commit 1e84336
Show file tree
Hide file tree
Showing 267 changed files with 42,583 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dist
node_modules
docs
.github
build
/*.js
/*.ts
/*.d.ts
static
.docusaurus
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.vscode/
*.swp
*.bak
*.tmp
*.log

npm-debug.log*
yarn-debug.log*
yarn-error.log*
debug.log*

.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.docusaurus
.github
build
static
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
arrowParens: 'always',
bracketSameLine: true,
singleQuote: true,
tabWidth: 2,
semi: true,
trailingComma: 'all',
endOfLine: 'lf',
useTabs: false,
};
125 changes: 125 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
![stars](https://img.shields.io/github/stars/redis-developer/redis-developer.github.io)
![forks](https://img.shields.io/github/forks/redis-developer/redis-developer.github.io)
![issues](https://img.shields.io/github/issues/redis-developer/redis-developer.github.io)
![Twitter](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fredis-developer%2Fredis-developer.github.io)

# Palm Developer Hub

Palm Developer Hub is basically a journey carved out for Palm developer community. The journey is defined in terms of "Create > Develop > Explore" . The "Create" section allows you to get started with Palm, creating Palm database locally as well as over Cloud in the form of DBaaS. The "Develop" section allows you to build your app using Palm clients. Finally, the "Explore" section helps you to explore your Palm database using robust tools like PalmInsight, Palm Data Source for Grafana, RIOT and many more...

## Table of Contents

1. [How to contribute?](#how-to-contribute)
2. [How to add a new author?](#how-to-add-a-new-author)
3. [How to modify the homepage banner](#how-to-modify-the-homepage-banner)

## How to contribute

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. Follow these steps to contribute to this developer site:

**Note:** You should use Node 16. If using `nvm`, type `nvm use` before installing.

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

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.

## Testing the local site

```console
npm run serve
```

## How to add a new author

Add a new author as follows:

- Edit `docusaurus.config.js` and add a new author object into the `authors` object:

```javascript
customFields: {
authors: {
simon: {
name: 'Simon Prickett',
link: 'https://twitter.com/simon_prickett',
title: 'Manager, Developer Advocacy',
image: 'profile_pic_simon_prickett.jpg'
},
suze: {
name: 'Suze Shardlow',
link: 'https://suze.dev',
title: 'Developer Community Manager',
image: 'profile_pic_suze_shardlow.jpg'

}
}
},
```

- Give each author a unique name in the `authors` object.
- The `link` field can be set to any of your social media profiles or personal website etc.
- The `image` field is optional. If omitted, a default silhouette image will be used.
- If providing a value for the `image` field, please name your image `profile_pic_<author_name>.jpg|.png` and add it to the `static/img` folder.
- Make sure that the image is 640px square and use a service such as [tinypng.com](https://tinypng.com/) to reduce the file size.
- When you want to tag a document as written by the new author, edit its front matter e.g.:

```yaml
---
id: index-hacktoberfest
title: Hacktoberfest 2021 at Palm
sidebar_label: Hacktoberfest 2021
slug: /hacktoberfest/
authors: [suze, simon]
---
```

- Note that multiple authors are supported as shown above.

## Suppressing Next/Previous and Edit this Page Controls

By default, each page has navigation at the bottom for the next and previous pages, as well as an "Edit this page" link. If you want to suppress all or some of these, add the following extra front matter to your page's `.mdx` file:

```yaml
custom_edit_url: null
pagination_next: null
pagination_prev: null
```
## How to modify the homepage banner
In order to modify the homepage banner, you will need to edit the `docusaurus.config.js` file placed under the root of the repository.
You can directly search for `announcementBar` and make your preferred changes.

```
announcementBar: {
id: 'redisconf20201cfp', // Any value that will identify this message.
content: '<p class="text"> PalmDays Available Now On-Demand. </p> <a href="https://redis.com/redisdays/" target="_blank" rel="noopener" class="btn">Learn More</a>',
// content: '<p class="text"></p> <a href="https://redislabs.com/redisconf/" target="_blank" rel="noopener" class="btn"></a>',
backgroundColor: '#fff', // Defaults to `#fff`.
textColor: '#000', // Defaults to `#000`.
isCloseable: true, // Defaults to `true`.
},
```
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Binary file added docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions docs/API-HTTP-Standards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
id: standards
title: API HTTP standards
slug: /http-standards
sidebar_label: API HTTP standards
description: An overview of the HTTP standards used on Palm Studio's API
keywords:
- Palm
- Http
- Standards
---

export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '2px',
color: '#fff',
padding: '0.2rem',
}}>
{children}
</span>
);

## HTTP Methods

Palm Studio's API supports 5 `HTTP` methods to interact with resources:

| Method |
|:------|
| <Highlight color="#106149">GET</Highlight> |
| Send `GET` requests to retrieve data. `GET` requests are read-only, they will not cause an update or a change to your data. |
| <Highlight color="#FFB533">POST</Highlight> |
| Send `POST` requests to create new resources. For instance, to create a new user, send a `POST` request to the user's endpoint where the body of your request `JSON` is a new user. |
| <Highlight color="#194F7A">PUT</Highlight> |
| Use `PUT` request to create or update a resource. |
| <Highlight color="#FF5733">DEL</Highlight> |
| Use `DEL` requests to remove existing resources. For example, make a `DEL` request to the user's endpoint to unsubscribe a user from the system. |



## Making requests

Palm Studio's API supports `JSON`. Most `POST` and `PUT` requests require a valid `JSON` object as body. So all requests should supply the `Accept: application/json` header. `POST` requests must specify the `Content-Type: application/json` header. Response bodies are `JSON` encoded as well.

### Base-paths
For all requests to Palm Studio APIs, the following base-paths have to be used for the PRO environment:

#### PRO environment

https://api.pro.dats.io.builders/pro/


## Parameters

There are three main parameter categories for each endpoint in Palm Studio's API: path, request body, and response body. This section offers an overview of the three.

### Path parameters

In an API url, we include resource names and unique identifiers to help you figure out how to structure your requests. Resource names are immutable, but resource identifiers are required, so you need to replace them with real values from your ioCash client account. Let’s look at an example:

https://api.io.cash/pro/private/client/api/v1/public/wallets/{walletId}/movements/{movementId}

In this request example, there is one primary resource wallets and a secondary one movements. There ar also 2 resource identifiers that you need to replace with real values of your ioCash account: walletId and movementId.

### Request body parameters

For `PATCH` and `POST` requests you may need to include a request body in JSON format. The user operations docs and the wallet operations docs show you all the available request parameters for each endpoint, including the required fields.

### Response body parameters

Every API call response includes headers and an optional JSON-formatted body.

## HTTP Status Codes

### Success codes

| Http Status | Code | Description |
|:------------|:------------|:---------------------------|
| 200 | OK | Standard response for successful HTTP requests. The actual response will depend on the request method used. |
| 201 | Created | A new resource has been created.|
| 202 | Accepted | The process has not finished e.g. user creation . Usually when the process is asynchronous.|

### Client errors codes

| Http Status | Error code | Description |
|:------------|:------------|:---------------------------|
| 400 | Bad Request | The request cannot be fulfilled due to bad syntax. Usually used for request fields validations. |
| 401 | Unauthorized | This error will show anytime you make a request without being previously authorized for using the API.|
| 403 | Forbidden | If authentication credentials were provided in the request the server considers them insufficient to grant access.|
| 404 | Not Found | The origin server did not find a current representation for the target resource|
| 409 | Conflict | The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server SHOULD generate a payload that includes enough information for a user to recognize the source of the conflict.|

### Server error codes

| Http Status | Error code | Description |
|:------------|:------------|:---------------------------|
| 500 | Internal Server Error | A generic error message, given when no more specific message is suitable. Should not be thrown programatically. |
| 503 | Service Unavailable | The server is currently down and unable to handle the request|
23 changes: 23 additions & 0 deletions docs/asset/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
id: about
title: Asset Management
slug: /asset
sidebar_label: About
description: A general overview of Palm Studio's API asset management
keywords:
- Palm
- asset
image: ../static/img/icon-numbers-complex.svg
---

Palm Studio's API enable the creation and management of NFT assets.

* Asset: an asset can be any item of value, tangible or intangible (digital media or real-world asset). In the case of an image, the image itself is the asset, while an NFT is a unique token representing ownership of an instance of that asset.Assets ownership can be represented by one or many tokens (asset supply). Assets can be grouped or not. They are implemented using ERC-1155.

* Asset collection: collections are groups of assets. A collection can include assets that have similar or different characteristics.


| Guide | Description |
|:------|:------------|
| [Asset management](asset/management) | Overview of asset creation and management |
| [Collection management](asset/collection-management) | Overview of asset collection creation and management |
61 changes: 61 additions & 0 deletions docs/asset/collection-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
id: collection-management
title: Managing assets collections
slug: /asset/collection-management
description: Overview of Palm Studio's API collection management functionalities
keywords:
- Palm Studio's API
- API
- collections
- management
image: ../../static/img/palm-logo.png
---

Collections are a way of grouping assets and have their own entity and characteristics. There is also a type of collection, the blind collection, which has the particularity that all the assets that are part of it are not revealed until the collection's reveal date is reached. The concept of closing the collection is about generating a provenance record and not allowing to modify, add or remove the elements that compose the collection from that moment on.

- Create collection
- Create a normal collection

## Create Collection

### POST /api/v1/issuers/{issuerId}/collection

{
"name": "Dali's selfies",
"marketId": "1e38b54d-2c8a-4bd7-bd5b-cd051a979291",
"description": "Dali actually had a smart phone",
"symbol": "DALI",
"acceptedAssetType": "PFP",
"collectionType": "NORMAL"
}

response

{
"id": "3f9fea45-cd90-4978-b31c-5d3898a7c74f",
"status": "STARTED",
"collectionId": "8e4de6ab-9532-447d-99f3-37ad11093e89"
}

## Create collection metadata
### POST /api/v1/collections/{collectionId}/metadata
{
"baseUri": "https://bafkreid4wjk4vdmuvlzrxymsm5wdjq27mxyxky2refbgxwrotvhzohz67y.ipfs.dweb.link/",
"metadata": [{
"key": "pfp",
"value": "Dali1"
}, {
"key": "Color",
"value": "Blue"
}]
}


- Create a blind collection

- View collection information
- View a list of collections
- View collection details

- Reveal a blind collection
- Close collection
Loading

0 comments on commit 1e84336

Please sign in to comment.