提到api的python包装器。

mention的Python项目详细描述


https://img.shields.io/pypi/v/MentionAPI.svghttps://travis-ci.org/mazi76erX2/mention-python.svg?branch=masterhttps://codecov.io/gh/mazi76erX2/mention-python/branch/master/graph/badge.svghttps://readthedocs.org/projects/mention-python/badge/?version=latest

api周围的python包装器。

安装

$ python3 -m pip install mention
>>>frommentionimportFetchAMentionAPI>>>first_mention=FetchAMentionAPI('access_token','account_id','alert_id','mention_id')>>>first_mention_data=first_mention.query()>>>title=first_mention_data['title']

示例

获取帐户的所有警报

>>>allAlerts=mention.FetchAlertsAPI(access_token,account_id)>>>data=nandosAlert.query()>>>alertsList=data['alerts']>>>alertsList[5]['alert']['name']'Nandos'>>>data['alert']['query']['included_keywords']['Nandos','Flame-grilled Chicken','Peri-Peri Sauce']

获取一个提示

>>>nandosMention=mention.FetchAMentionAPI(access_token,account_id,alert_id,mention_id)>>>data=nandosMention.query()>>>data['title']"Nando's launches their own food ordering app">>>data['description']"Nando's has launched their own app that will allow people to order their favourite meal from the comfort...oftheirownhome.">>>data['original_url']'https:\/\/www.iol.co.za\/business-report\/technology\/nandos-launches-their-own-food-...ordering-app-18378360'

阅读更多信息

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用字符而不是字符串的意义   部分匹配长度字符串相似性的java正则表达式   java获取构造函数错误(错误:“(”或“[”)   java@Value注释无法正常工作SpringBoot   java hasKey在响应中没有看到字段   java JavaFX,没有JFXButtons和所有   在Log4j2中,是否可以根据键从记录器中筛选出某些键值对?   如何使用Java中Kafka的消息,从特定偏移量开始   java在单击后存储动态按钮的值   java Android编码:ViewRootImpl$CalledFromErrorThreadException。[Noob]   通过FileChooser保存pdf格式会提示在java中出现第二个对话框   用于空文件的java Spring集成文件标记   java我们应该如何编写get方法,以便私有字段不会超出其预期范围?   java Eclipse产品问题,Juno RequireHandle:org。日食e4。果心服务