How to list all active conversation SIDs? - twilio-conversations

How can I get all conversations in an active state?
I'm using this command to list all conversation SIDs, but I can't find a way to filter only the active ones.
twilio api:conversations:v1:services:conversations:list \
--chat-service-sid ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
--properties sid,state --limit=100
In help command I see it has a page-size=<value> parameter, but there's no way to specify which page to retrieve
twilio api:conversations:v1:services:conversations:list --help
Console output image

Unfortunately don't have a method to filter conversations by the status on search conversations API. But you can list all conversations and filter just conversations with the status "active". Follow and example using the Twilio CLI:
you can use the -no-limit to bring all conversations without paginating
twilio api:conversations:v1:conversations:list --no-limit --properties sid,state | grep active
I hope that it can help you :D.

Related

List all Schedule Query with user who created

I use bq ls --transfer_config --transfer_location=asia-southeast-1 --format json without max-results to list all the schedule query existing.
It should returns ListTransferConfigsResponse having TransferConfig Obj inside but it's not. I need "OwnerInfo" which has the email of the user. Did google write missing docs? I want to call 1 api to get all info. Any help?

Line Bot; how to get user LINE ID?

i am trying to create line chatbot with several functions in it. One of the function need to know the user LINE ID (for example: ryan123) not user id (U858382312321123......). I am using google app script to create the line chatbot
is it possible to get user LINE ID using API? or is there any way to get this through line bot?
/profile/{userId} is the only* way you can get displayName
*though there endpoints to get the profile with userId by further specifying the groupId or roomId
In case your Messaging API bot is a verified or premium account, you can use a list of userId of followers at anytime with followers/ids
Otherwise, you need to store them upon follow, messsage, etc. events

Disqus API: get total forum number of comments/posts

I'm trying to get the total number of comments that have been written in a given forum.
Looking at http://disqus.com/api/docs/ I can't see anything like this. Honestly, it sounds weird.
Forum details ( http://disqus.com/api/docs/forums/details/ ) shows anything but.
Any hack/piece of code/hidden API call that would to the trick?
Thanks in advance
The best way I have found is to get the list of all the threads and then sum the number of posts for each one:
curl -0 -L "https://disqus.com/api/3.0/forums/listThreads.json?api_key=YOUR_API_KEY&forum=YOUR_FORUM_NAME&limit=100"
Dont forget to iterate over different pages of results if you get a 'next' cursor (response['cursor']['next']).
See this gist for a full JavaScript example (intended to run on Google Script):
https://gist.github.com/sarfata/5068200

Get asana tasks in project with assignee information

I am trying to retrieve asana tasks within a project. I would like to retrieve assignee information in the same query. I tried this query and got assignee id:
curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee
I want get assignee name. So I include "opt_expand=assignee":
curl -u <key>: "https://app.asana.com/api/1.0/projects/<project-id>/tasks?opt_fields=name,created_at,assignee&opt_expand=assignee
I still don't get assignee name. What's the way to do this?
Thanks
(I work at Asana)
The interplay between opt_fields and opt_expand is actually a bit complicated, we should clarify in the documentation. The latter ends up superseded by - not additive with - the former.
The best way to achieve what you want would be to NOT use opt_expand and to add assignee.name to the list of fields in opt_fields.

Twitter API and RT information

With the twitter search API you can request "only original tweets" or "only retweets".
If you are requesting "everything", how can you determine for each result which one is a RT and which one is not ? If this is a RT, how can I know who the original author is ?
Am I missing an option to make the API add some "retweet information" to status results ?
Retweets should have retweeted_status and inside it the user object.