You can get a list of all application scope topic. If there are more than 50 topics, you need to get the topic list in multiple pages with the pagination.
The following is the sample code for getting a list of all application scope topics.
This is the brief explanation of the sample code:
Execute the listTopics method to get a list of topics.
Check the nextPaginationKey to determine if there exist more topics to get. If there are ones, execute the listTopics method again with the nextPaginationKey set as a parameter.
Getting a list of group-scope topics
You can get a list of all topics in the specified group scope. If there are more than 50 topics, you need to get the topic list in multiple pages with the pagination.
The following is the sample code for getting a list of all topics in a group scope.
This is the brief explanation of the sample code:
Execute the listTopics method to get a list of topics.
Check the nextPaginationKey to determine if there exist more topics to get. If there are ones, execute the listTopics method again with the nextPaginationKey set as a parameter.
Getting a list of user-scope topics
You can get a list of all topics in the specified user scope. If there are more than 50 topics, you need to get the topic list in multiple pages with the pagination.
The following is the sample code for getting a list of all topics in a user scope.
This is the brief explanation of the sample code:
Execute the listTopics method to get a list of topics.
Check the nextPaginationKey to determine if there exist more topics to get. If there are ones, execute the listTopics method again with the nextPaginationKey set as a parameter.