【问题标题】:Meteor Oauth access other websites (500px instagr.am)Meteor Oauth 访问其他网站 (500px instagr.am)
【发布时间】:2012-04-28 17:00:57
【问题描述】:

我的流星网络应用http://meteor.app 基本上是许多其他网站的代理:即http://500px.comhttp://instagr.am

当用户在我的http://meteor.app 上搜索关键字时,我希望我的流星服务器代码搜索http://500px.comhttp://instagr.am
(实际上我的前端调用了我的服务器端点http://meteor.app/search,这将对 500px 和 instrag.am 进行 Oauth 调用) (我目前对 oauth 没有问题,使用 connect-auth atm)

我不确定如何在流星上创建http://meteor.app/search 端点,因为一切都围绕 ORM/Collection 进行,在这个阶段我不使用持久性。

那么我应该使用和自定义 Meteor.Collection 类来查询 instragr.am 端点还是?

【问题讨论】:

    标签: meteor instagram


    【解决方案1】:

    我认为您的客户端代码应该使用:Meteor.call,它将调用 Meteor.method。 http://docs.meteor.com/#meteor_methods

    此方法可以更新 n 行 instagram 的集合并删除所有集合行并在调用 Meteor.method 时重新填充集合。

    有一个模糊的问题,虽然答案会很模糊:)。

    Madewith 应用是一个很好的起点: https://github.com/meteor/madewith 这使用 API 调用等。

    【讨论】:

    • 抱歉不太清楚,我对 oauth 没有问题(还)。我的问题是如何充分按摩 Meteor,以便查询 instragr.am http 端点?以及如何创建我的 /search 端点?
    • 好吧,我以为这是一些新的顶级域名:P
    • Meteor.method 看起来很有前途,会用它来玩的 :)
    • 是的,我可以使用 Meteor.methods() 在服务器上定义一个端点,并使用 Meteor.call() 调用它,如 stackoverflow.com/questions/10343656/…
    猜你喜欢
    • 1970-01-01
    • 2021-04-01
    • 2023-03-12
    • 2014-07-13
    • 1970-01-01
    • 1970-01-01
    • 2015-01-29
    • 2021-01-16
    • 2016-11-27
    相关资源
    最近更新 更多