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

Rest Channel Presence#get #55

Merged
merged 31 commits into from Apr 26, 2021
Merged

Rest Channel Presence#get #55

merged 31 commits into from Apr 26, 2021

Conversation

tiholic
Copy link
Contributor

@tiholic tiholic commented Oct 16, 2020

getting presence members via rest#channels#channel#presence#get list as a PaginatedResult

Supported platforms:

  • Android
  • iOS

Example:

void getPresence([ably.RestPresenceParams params]) async {
    // getting channel history, by passing or omitting the optional params
    var result = await channel.presence.get(params);

    var presenceMembers = result.items; //returns PresenceMessages
    var hasNextPage = result.hasNext(); //tells whether there are more results
    if(hasNextPage){    
      result = await result.next();  //fetches next page results
      presenceMembers = result.items;
    }
    if(!hasNextPage){
      result = await result.first();  //fetches first page results
      presenceMembers = result.items;
    }
}

// getting presence members with default params
getPresence();

// filtered presence members
getPresence(ably.RestPresenceParams(
  limit: 10,
  clientId: '<clientId>',
  connectionId: '<connectionID>',
));

Other changes:

  1. re-arrange pagination method call handlers
  2. improve log messages on iOS side
  3. flutter format on few files

@tiholic tiholic changed the base branch from main to feature/realtime-history October 16, 2020 18:31
@tiholic tiholic marked this pull request as draft October 16, 2020 18:35
@tiholic tiholic marked this pull request as ready for review October 17, 2020 08:22
@tiholic tiholic requested review from zoechi and QuintinWillison and removed request for zoechi October 17, 2020 08:23
@tiholic tiholic added this to the Stage 2 milestone Oct 19, 2020
@tiholic tiholic marked this pull request as draft November 18, 2020 11:04
@tiholic tiholic force-pushed the feature/realtime-history branch 4 times, most recently from 5422182 to bc5b7ea Compare November 25, 2020 18:25
@tiholic tiholic modified the milestones: Stage 1.1 , Stage 2 Nov 25, 2020
@tiholic tiholic self-assigned this Dec 3, 2020
@tiholic tiholic changed the base branch from feature/realtime-history to feature/docstrings December 3, 2020 16:48
@tiholic tiholic marked this pull request as ready for review December 3, 2020 16:48
@tiholic tiholic force-pushed the feature/docstrings branch 2 times, most recently from a297193 to 356e018 Compare January 12, 2021 09:48
Base automatically changed from feature/docstrings to main March 22, 2021 10:23
@QuintinWillison QuintinWillison removed the request for review from zoechi March 22, 2021 10:29
@QuintinWillison QuintinWillison merged commit 875eef2 into main Apr 26, 2021
@QuintinWillison QuintinWillison deleted the rest-presence branch April 26, 2021 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants