SDKs overview

Feedbin offers a RESTful API that allows developers to programmatically interact with their RSS reader service. This includes functionalities such as managing subscriptions, fetching feed content, marking items as read or unread, and integrating with external applications. The API utilizes basic authentication over HTTPS for secure communication. While Feedbin provides official developers documentation detailing the available endpoints and request/response formats, several official and community-contributed Software Development Kits (SDKs) and libraries simplify the integration process by providing language-specific wrappers around the API calls. These SDKs handle common tasks like authentication, request formatting, and response parsing, enabling developers to focus on application logic rather than low-level API interactions. For detailed API specifications, refer to the Feedbin Developers documentation.

The Feedbin API supports standard HTTP methods (GET, POST, PUT, DELETE) for resource manipulation. Resources include subscriptions, entries, taggings, and unread entries. For instance, fetching a user's subscriptions involves a GET request to /v2/subscriptions.json, while marking an entry as read might involve a POST request to /v2/unread_entries/delete.json with the appropriate entry ID. All API responses are typically formatted as JSON. Understanding the fundamental principles of RESTful API design, as outlined in web architectural guides like the W3C's SOAP specification, can aid in effective utilization of the Feedbin API and its SDKs.

Official SDKs by language

Feedbin maintains specific official libraries to facilitate integration for popular programming languages. These libraries are typically kept up-to-date with API changes and offer a stable foundation for development. The primary official SDK is for Ruby, reflecting Feedbin's own technology stack.

Language Package Name Install Command Maturity
Ruby feedbin-api gem install feedbin-api Official, maintained

The official Ruby gem, feedbin-api, provides a direct interface to the Feedbin API. It abstracts the HTTP requests and JSON parsing, allowing Ruby developers to interact with Feedbin objects using Ruby classes and methods. This library is particularly useful for server-side applications or scripts written in Ruby that need to manage Feedbin data programmatically. Its maintenance aligns with official Feedbin development, ensuring compatibility and access to recent API features. Developers are encouraged to consult the official Feedbin API documentation for the most current information regarding API endpoints and data structures, which the SDK typically mirrors.

Installation

Installation procedures vary by programming language due to different package management systems. The following provides specific steps for installing the official Ruby SDK and general guidance for common community-contributed libraries.

Ruby

To install the official feedbin-api gem, you need a Ruby environment with RubyGems installed. Open your terminal or command prompt and execute the following command:

gem install feedbin-api

This command downloads and installs the gem and its dependencies from the RubyGems repository. After installation, you can include the gem in your Ruby project by adding require 'feedbin-api' to your script or Gemfile. For production applications, it is standard practice to manage dependencies using Bundler, by adding gem 'feedbin-api' to your Gemfile and then running bundle install.

Python (Community)

For Python, community libraries are typically installed via pip, the Python package installer. For example, if a library named python-feedbin exists (check pypi.org for actual names), you would install it with:

pip install python-feedbin

It is recommended to use a virtual environment for Python projects to manage dependencies effectively. A virtual environment isolates your project's dependencies from other Python projects, preventing conflicts. You can create one with python -m venv .venv and activate it with source .venv/bin/activate (on Unix/macOS) or .venv\Scripts\activate (on Windows) before installing packages.

JavaScript/Node.js (Community)

JavaScript libraries, especially for Node.js environments, are installed using npm (Node Package Manager). If a community library for Feedbin is available, you would install it into your project directory using:

npm install feedbin-client

This command adds the package to your node_modules directory and updates your package.json file. For front-end JavaScript development, you might also use a bundler like Webpack or Rollup to include these packages in your browser-side code. The Node Package Manager documentation provides further details on npm install usage.

Quickstart example

This example demonstrates how to use the official Ruby SDK to fetch the latest entries from your Feedbin account. Before running this code, ensure you have installed the feedbin-api gem as described in the installation section and have your Feedbin API credentials (username/email and password) ready.

require 'feedbin-api'

# Configure with your Feedbin credentials
# Replace '[email protected]' and 'your_password' with actual credentials
FeedbinAPI.configure do |config|
  config.username = '[email protected]'
  config.password = 'your_password'
end

begin
  # Initialize the API client
  client = FeedbinAPI::Client.new

  # Fetch recent entries (e.g., the last 20 unread entries)
  puts "Fetching recent unread entries..."

  # The 'entries' method can take parameters like 'read_entries', 'starred_entries', 'since', 'per_page'
  # For a simple example, let's just get the latest entries without specifying read status
  entries = client.entries(per_page: 10) # Fetch up to 10 entries

  if entries.any?
    puts "Successfully fetched #{entries.length} entries:"
    entries.each do |entry|
      puts "- Title: #{entry.title}"
      puts "  Feed:  #{entry.feed_title}"
      puts "  URL:   #{entry.url}"
      puts "  ID:    #{entry.id}"
      puts "  Summary: #{(entry.summary || entry.content || '').strip.slice(0, 100)}..."
      puts "---"
    end
  else
    puts "No entries found or unable to fetch."
  end

rescue FeedbinAPI::UnauthorizedError
  puts "Authentication failed. Please check your username and password."
rescue FeedbinAPI::Error => e
  puts "An API error occurred: #{e.message}"
rescue StandardError => e
  puts "An unexpected error occurred: #{e.message}"
end

This example first configures the API client with your authentication details. It then creates a client instance and calls the entries method to retrieve a list of recent entries. For each entry, it prints the title, associated feed, URL, and a snippet of its content or summary. Error handling is included to catch common issues like authentication failures or general API errors. Remember to replace placeholder credentials with your actual Feedbin account information.

Community libraries

Beyond the official Ruby gem, the Feedbin developer community has contributed libraries in various languages, offering alternatives for developers working outside the Ruby ecosystem. These community-driven projects vary in their level of completeness, maintenance, and adherence to the latest Feedbin API changes. Developers should verify the activity and compatibility of these libraries with the current Feedbin API specification before integrating them into production systems.

  • Python: Several Python libraries exist, often found on PyPI. Examples include python-feedbin or similar projects that wrap the Feedbin API. These typically provide an object-oriented interface for interacting with feeds, entries, and subscriptions. Developers should search the Python Package Index (PyPI) for the most up-to-date and widely used options.
  • Go: For Go developers, there might be unofficial client libraries available on GitHub or similar code hosting platforms. These libraries usually follow Go conventions for package structure and error handling, providing a idiomatic way to interact with the Feedbin API.
  • JavaScript/Node.js: JavaScript clients, suitable for both Node.js backend applications and potentially browser-based frontends (with appropriate CORS handling or proxying), also exist. These are often distributed via npm and provide asynchronous methods for API calls, consistent with JavaScript's event-driven nature. Check npmjs.com for available packages.

When selecting a community library, consider the following factors: project activity (last commit date), number of contributors, documented issues, and features supported compared to the official Feedbin API capabilities. Reviewing the source code and examples is also advisable to ensure it meets your project's specific requirements and quality standards. Community support can often be found through project issue trackers or developer forums, offering additional resources for troubleshooting and implementation guidance.