Meteor JS - 如何在 Telescope 应用程序中以编程方式访问帖子 [英] Meteor JS - How to access posts programmatically in Telescope app

查看:43
本文介绍了Meteor JS - 如何在 Telescope 应用程序中以编程方式访问帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用创作者提供的 Telescope (http://www.telesc.pe/)Meteor 用于一个小项目.我刚刚开始学习 Meteor,并且由于基本上数据库/Web 服务器和应用程序堆栈被合并到一个框架中,我想知道对我来说最有效的方法是什么让我拥有一个外部应用程序(例如:python 脚本) post并访问来自 Telescope 的帖子/评论.本质上,我希望机器人能够:

I have recently started using Telescope (http://www.telesc.pe/) from the creators of Meteor for a small project. I am just starting to learn about Meteor, and since essentially database / web server and application stack are collapsed into one framework, I'm wondering what the most efficient way is for me to have an external application (for ex: python script) post and access posts/comments from Telescope. Essentially, I'd like a bot to be able to:

  • 创建帖子
  • 为帖子添加评论
  • 拉回帖子列表

理想情况下,我想通过 HTTP 请求(get/post/etc)访问它,但不确定如何在望远镜/流星或可能的数据库查询中执行此操作.任何帮助(例如创建新帖子的示例 API 调用)或使用 Meteor 执行此操作的适当方法将不胜感激!

Ideally I'd like to access this via HTTP requests (get/post/etc), but am not sure how to do this within telescope / meteor or possibly DB queries. Any help (such as an example API call to create a new post) or the appropriate way to do this using Meteor would be much appreciated!

推荐答案

来自 文档看起来 Telescope 没有网络服务 API 并且在 路线图上没有任何计划 要么.

From the documentation it doesn't look like Telescope has a webservice API and there aren't any plans for it on the roadmap either.

幸运的是meteor有一个打包系统,望远镜已经用了很多.因此,您可以制作一个连接到望远镜并为您描述的功能公开网络服务的流星包.

Luckily meteor has a packaging system, which telescope already uses a lot. So you could make a meteor package that hooks into telescope and exposes webservices for the functionality you described.

Meteorpedia 有一篇关于如何在 Meteer 中创建 rest api 的好文章:这里

Meteorpedia has a good article on how to create rest api's in meteor: here

这篇关于Meteor JS - 如何在 Telescope 应用程序中以编程方式访问帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆