【问题标题】:I'm looking for a way to filter evenbrite events. But it brings me all the events. How can i filter them?我正在寻找一种过滤 evenbrite 事件的方法。但它给我带来了所有的事件。我该如何过滤它们?
【发布时间】:2019-07-05 00:25:36
【问题描述】:

我在过滤 eventbrite api 中的事件时遇到问题,它给我带来了一切。 我已经拥有令牌并且我知道如何使用它。

var request = require('request');
request({

  method: 'GET',
  url: 'https://www.eventbriteapi.com/v3/events/search/?location.address=cordoba%20argentina',
  headers: {
    'Authorization': 'Bearer PERSONAL_OAUTH_TOKEN',

    'Content-Type': 'application/json'

  }}, function (error, response, body) {

  console.log('Status:', response.statusCode);
  console.log('Headers:', JSON.stringify(response.headers));
  console.log('Response:', body);

});

我认为它给我带来了evenbrite的所有事件

【问题讨论】:

    标签: node.js api express eventbrite


    【解决方案1】:

    HTTP 请求有 2 个问题:

    1. 应该是/v3/events/search?location.address=...,而不是/v3/events/search/?location.address=...

    2. 'Content-Type': 'application/json' 标头定义不正确 -- 它是一个普通的 GET 请求,请求正文中没有 JSON 数据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-01-19
      • 1970-01-01
      • 1970-01-01
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 2021-10-24
      相关资源
      最近更新 更多