absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.42k stars 665 forks source link

Update SDK godocs #2275

Open nyagamunene opened 3 weeks ago

nyagamunene commented 3 weeks ago

What were you trying to achieve?

Currently the SDK godocs are outdated from the recent changes.

What are the expected results?

Update SDK godocs to reflect recent changes.

What are the received results?

Past permissions like owner is still in the docs but they are no longer being used. Some of the examples are failing.

Steps To Reproduce

  1. Update the relations and permissions.
  2. Test and update the examples individually.

In what environment did you encounter the issue?

Magistrala

Additional information you deem important

No response

arvindh123 commented 2 weeks ago

Some of the SDK function godocs have invalid relations , Listing endpoints of groups and channel (may be domain ) can list with Permissions and Relations We need to check the funcationalies of endpoints and update the godocs for List , assign ,unassign and other endpoint

Example: In below function , godocs have owner but we don't have owner relation. Like we need to check and modify the godocs

    // ListUserChannels list all channels belongs a particular user id.
    //
    // example:
    //  pm := sdk.PageMetadata{
    //      Offset: 0,
    //      Limit:  10,
    //      Permission: "edit", // available Options:  "administrator", "delete", edit", "view", "share", "owner", "admin", "editor", "viewer"
    //  }
    //  channels, _ := sdk.ListUserChannels("user_id_1", pm, "token")
    //  fmt.Println(channels)
    ListUserChannels(userID string, pm PageMetadata, token string) (ChannelsPage, errors.SDKError)