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

Create NewsAPI.yaml #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

constantinedev
Copy link

I have the example for using request in maubot
expect to help and understand how the get 3rd party API to use in maubot.

@williamkray
Copy link
Collaborator

this bot is described multiple times to be an example of how to use APIs in maubot, but there are quite a few problems here:

  • spelling and grammar errors in the description which make it difficult to understand what the bot does
  • the bot uses requests instead of the built-in aiohttp which directly goes against the documented recommendations, but does not list this as an anti-feature
  • there are several bots in this catalog that already demonstrate how to use APIs in maubot, and are written to follow the above best practices

i recommend either fixing the bot to use aiohttp, or ensuring that the antifeatures list includes synchronous as can be found in other plugins that include the use of requests (take a look at social-media-download plugin for an example)

@constantinedev
Copy link
Author

constantinedev commented Jul 21, 2023

Yes you are right, that's I have update my source in my project.
I agree with that to use with aiohttp.
That's because is the basic request understanding example for.
it can be also easy to ready for request with proxy, I have test it I make my update code already.
hope I can pass you checking :)

author: constantinedev

description:
This code for example how to use the requests modules in mautrix bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be proper YAML format otherwise the page will throw an error. please test your changes by building the site with Hugo.

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

Successfully merging this pull request may close these issues.

2 participants