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

🐛 [BUG] - Outdated Documentation for Spaces Integration #1172

Open
Gautam25Raj opened this issue Mar 18, 2024 · 1 comment
Open

🐛 [BUG] - Outdated Documentation for Spaces Integration #1172

Gautam25Raj opened this issue Mar 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Gautam25Raj
Copy link

Gautam25Raj commented Mar 18, 2024

Expected Behaviour

The documentation accurately reflects the current implementation of the Spaces class, ensuring developers have the correct information for integration.

Current Behaviour

I've been working on integrating Spaces into my DApp and encountered discrepancies between the provided documentation and the actual implementation. After expanding the Spaces class, I noticed that the parameters and objects differ from what is outlined in the documentation.

Reproduction steps

1. Follow the steps outlined in the [Spaces Integration Guide](https://github.com/ethereum-push-notification-service/push-sdk/tree/main/packages/restapi#to-create-a-space).

2. Expand the Spaces class as per the documentation.

3. Compare the parameters and objects in the documentation with the actual implementation.

Screenshots

image

image

Relevant Logs

TypeError: Cannot read properties of undefined (reading 'create') at initializeSpace (page.js:24:42)

After updating spaceOptions:
POST https://backend-staging.epns.io/apis/v2/chat/groups 400 (Bad Request)

page.js:23 [Error - API createGroupV2] {
  "status": 400,
  "errorCode": "00000000000",
  "message": "Validation failed",
  "details": {
    "body": {
      "source": "body",
      "keys": [
        "groupImage"
      ],
      "message": "\"groupImage\" must be a string"
    }
  },
  "timestamp": "2024-03-18T11:46:14.459Z"
}

page.js:23 [Push SDK] - API  - Error - API createV2 -:   ValidationError: Validation failed
    at handleError (validationError.js:79:29)
    at eval (createGroupV2.js:102:49)
    at Generator.throw (<anonymous>)
    at rejected (tslib.es6.mjs:153:63)

createV2.js:37 Uncaught (in promise) Error: [Push SDK] - API  - Error - API createV2 -: ValidationError: Validation failed
    at Object.eval (createV2.js:37:19)
    at Generator.throw (<anonymous>)
    at rejected (tslib.es6.mjs:153:63)

Dapp Env

Staging (staging.push.org)

Browsers

Chrome

@Gautam25Raj Gautam25Raj added the bug Something isn't working label Mar 18, 2024
@Siddesh7
Copy link
Collaborator

Hi @Gautam25Raj The current docs is not updated for Highlevel class implementation yet, the current API docs shows low level implementation only. The High level class docs should be out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants