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

Get activity by id #92

Open
samoilovich opened this issue Apr 19, 2021 · 4 comments
Open

Get activity by id #92

samoilovich opened this issue Apr 19, 2021 · 4 comments
Assignees

Comments

@samoilovich
Copy link

samoilovich commented Apr 19, 2021

Hello.

I have a problem. I need to get activity by id in Android.
Does Java lib have something simiIar to iOs?
https://github.com/GetStream/stream-swift/wiki/Activities#advanced

// retrieve two activities by ID:
Client.shared.get(typeOf: Activity.self, activityIds: ["01b3c1dd-e7ab-4649-b5b3-b4371d8f7045", 
                                             "ed2837a6-0a3b-4679-adc1-778a1704852d"])

Could you help with that?

Thank you.

@shodgetts
Copy link

Agent comment from Anders Lund in Zendesk ticket #11227:

Hi there,

Sure, I'd recommend taking a look at our documentation on this here: https://getstream.io/activity-feeds/docs/java/add_many_activities/?language=java. I hope this helps

@samoilovich
Copy link
Author

samoilovich commented Apr 19, 2021

@shodgetts
Thank you for quick answer.
Sorry, but not really.
Some problems with that:

  1. If I try to get activitie swith batch client (and I have tried that) I have an exception:
java.util.concurrent.ExecutionException: io.getstream.core.exceptions.StreamAPIException: NotAllowedException: signature is invalid (code = 17 status = 403)

GetStream/feeds-sample-android#1

  1. And in the documentation if you switch from Java to Swift the axample looks like
// retrieve two activities by ID: 
client.get(typeOf: Activity.self, activityIds: ["01b3c1dd-e7ab-4649-b5b3-b4371d8f7045", 
                                                "ed2837a6-0a3b-4679-adc1-778a1704852d"]) { result in 
    /* ... */  
} 

but not Client.shared.get as in my description above.

@samoilovich
Copy link
Author

@shodgetts
Any ideas about that situation?
I need to go forward and implement a feature to get activity by id. For now I am stuck with that. We have iOs, Android and web application. And If Android doesn't have variants to resolve that we need to rewrite our logic in a different way.
Thank you.

@ferhatelmas
Copy link
Contributor

This is missing from cloud client even if client has it. Will be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants