Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbinf committed Apr 28, 2021
1 parent 8b817d6 commit 9534686
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# podcast-api-ruby
# Podcast API Ruby Library

[![Build Status](https://travis-ci.com/ListenNotes/podcast-api-ruby.svg?branch=main)](https://travis-ci.com/ListenNotes/podcast-api-ruby)

The Podcast API Ruby library provides convenient access to the [Listen Notes Podcast API](https://www.listennotes.com/api/) from
applications written in Ruby.

Simple and no-nonsense podcast search & directory API. Search the meta data of all podcasts and episodes by people, places, or topics.

<a href="https://www.listennotes.com/api/"><img src="https://raw.githubusercontent.com/ListenNotes/ListenApiDemo/master/web/src/powered_by_listennotes.png" width="300" /></a>

## Documentation

See the [Listen Notes Podcast API docs](https://www.listennotes.com/api/docs/).


## Installation

Install the package with:
```sh
gem install podcast-api
```


### Requirements

- Ruby 2.3+

## Usage

The library needs to be configured with your account's API key which is
available in your [Listen API Dashboard](https://www.listennotes.com/api/dashboard/#apps). Set `apiKey` to its
value:

```ruby

# TODO
```

If `apiKey` is null, then we'll connect to a [mock server](https://www.listennotes.com/api/tutorials/#faq0) that returns fake data for testing purposes.

You can see all available API endpoints and parameters on the API Docs page at [listennotes.com/api/docs/](https://www.listennotes.com/api/docs/).
1 change: 1 addition & 0 deletions examples/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem "podcast_api", path: "../"
16 changes: 16 additions & 0 deletions examples/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PATH
remote: ..
specs:
podcast_api (1.0.1)

GEM
specs:

PLATFORMS
ruby

DEPENDENCIES
podcast_api!

BUNDLED WITH
1.17.2
1 change: 1 addition & 0 deletions examples/sample.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "podcast_api"
11 changes: 11 additions & 0 deletions lib/podcast_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require "net/http"

# Version
require "version"

puts PodcastApi::VERSION

module PodcastApi
end
5 changes: 5 additions & 0 deletions lib/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module PodcastApi
VERSION = "1.0.1"
end
40 changes: 40 additions & 0 deletions podcast_api.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# frozen_string_literal: true

$LOAD_PATH.unshift(::File.join(::File.dirname(__FILE__), "lib"))

require "version"

Gem::Specification.new do |s|
s.name = "podcast_api"
s.version = PodcastApi::VERSION
s.required_ruby_version = ">= 2.3.0"
s.summary = "Ruby bindings for the Listen Notes Podcast API"
s.description = "Listen Notes is the best podcast search engine and api. " \
"See https://www.listennotes.com/api/ for details."
s.author = "Listen Notes, Inc."
s.email = "[email protected]"
s.homepage = "https://www.listennotes.com/api/"
s.license = "MIT"

s.metadata = {
"bug_tracker_uri" => "https://github.com/ListenNotes/podcast-api-ruby/issues",
"changelog_uri" =>
"https://github.com/ListenNotes/podcast-api-ruby/releases",
"documentation_uri" => "https://www.listennotes.com/api/docs/",
"github_repo" => "https://github.com/ListenNotes/podcast-api-ruby",
"homepage_uri" => "https://www.listennotes.com/api/",
"source_code_uri" => "https://github.com/ListenNotes/podcast-api-ruby",
}

ignored = Regexp.union(
/\A\.editorconfig/,
/\A\.git/,
/\A\.rubocop/,
/\A\.travis.yml/,
/\Atest/
)
s.files = `git ls-files`.split("\n").reject { |f| ignored.match(f) }
s.executables = `git ls-files -- bin/*`.split("\n")
.map { |f| ::File.basename(f) }
s.require_paths = ["lib"]
end

0 comments on commit 9534686

Please sign in to comment.