From 0c0495b5f165e4df2cd37c2a6ce6e5d962da103d Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 1 Apr 2018 01:58:03 +0200 Subject: [PATCH] added Instance::streaming_api() --- CMakeLists.txt | 2 +- src/easy/easy.hpp | 2 +- src/easy/instance.cpp | 4 ++-- src/easy/instance.hpp | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1e540a..03d595e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastodon-cpp - VERSION 0.7.18 + VERSION 0.7.19 LANGUAGES CXX ) diff --git a/src/easy/easy.hpp b/src/easy/easy.hpp index 3d7fad8..49b4bb7 100644 --- a/src/easy/easy.hpp +++ b/src/easy/easy.hpp @@ -183,7 +183,7 @@ public: */ const double get_double(const string &key) const; - // TODO: Investigate if uint8_t would be better + // TODO: Maybe an enum would be better? /*! * @brief Returns the value of key as bool * diff --git a/src/easy/instance.cpp b/src/easy/instance.cpp index c36f869..ef658f6 100644 --- a/src/easy/instance.cpp +++ b/src/easy/instance.cpp @@ -72,7 +72,7 @@ const string Instance::version() const return get_string("version"); } -const std::vector Instance::urls() const +const string Instance::streaming_api() const { - return get_vector("urls"); + return get_string("urls.streaming_api"); } diff --git a/src/easy/instance.hpp b/src/easy/instance.hpp index 2fa16ca..d80c418 100644 --- a/src/easy/instance.hpp +++ b/src/easy/instance.hpp @@ -90,11 +90,10 @@ namespace Mastodon */ const string version() const; - // TODO: Find out what Instance.urls is about /*! - * @brief Returns the a vector of URLs for the streaming API (?) + * @brief Returns the URL for the streaming API */ - const std::vector urls() const; + const string streaming_api() const; }; }