Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Yt::Annotations is a Ruby library to fetch annotations, cards and end screens of
The **source code** is available on [GitHub](https://github.com/fullscreen/yt-annotations) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/fullscreen/yt-annotations/Yt/Annotations).

[![Build Status](http://img.shields.io/travis/Fullscreen/yt-annotations/master.svg)](https://travis-ci.org/Fullscreen/yt-annotations)
[![Coverage Status](http://img.shields.io/coveralls/Fullscreen/yt-annotations/master.svg)](https://coveralls.io/r/Fullscreen/yt-annotations)
[![Coverage Status](https://coveralls.io/repos/github/Fullscreen/yt-annotations/badge.svg?branch=master)](https://coveralls.io/github/Fullscreen/yt-annotations?branch=master)
[![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/yt-annotations.svg)](https://gemnasium.com/Fullscreen/yt-annotations)
[![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/yt-annotations.svg)](https://codeclimate.com/github/Fullscreen/yt-annotations)
[![Maintainability](https://api.codeclimate.com/v1/badges/b186efaae14e521ca51d/maintainability)](https://codeclimate.com/github/Fullscreen/yt-annotations/maintainability)
[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/gems/yt-annotations/Yt/Annotations)
[![Gem Version](http://img.shields.io/gem/v/yt-annotations.svg)](http://rubygems.org/gems/yt-annotations)

Expand All @@ -18,24 +18,24 @@ How to use
Simply call `Yt::Annotations.for` with the ID of a YouTube video:

```ruby
annotations = Yt::Annotations.for 'MESycYJytkU'
# => [#<Yt::Annotations::Featured …>]
annotations = Yt::Annotations.for 'rdwz7QiG0lk'
# => [#<Yt::Annotations::Branding …>]
annotations.first.text
# => "Suggested by Fullscreen: What is Fullscreen?"
# => ""
annotations.first.starts_at
# => 76.0
# => 30.0
annotations.first.ends_at
# => 86.0
# => 424.0
annotations.first.link
# {url: "https://www.youtube.com/watch?v=NeMlqbX2Ifg", new_window: true, type: :video}
# {:url=>"https://www.youtube.com/user/YouTube", :new_window=>true, :type=>:channel}
```

How to install
==============

Yt::Annotations requires **Ruby 2.2.2 or higher**.

To include in your project, add `gem 'yt-annotations', ~> '1.0'` to the `Gemfile` file of your Ruby project.
To include in your project, add `gem 'yt-annotations', ~> '2.0'` to the `Gemfile` file of your Ruby project.


How to contribute
Expand Down
2 changes: 1 addition & 1 deletion yt-annotations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'activesupport', '>= 4', '< 6'

spec.add_development_dependency 'bundler', '~> 1.14'
spec.add_development_dependency 'bundler', '~> 2.0.2'
spec.add_development_dependency 'rspec', '~> 3.5'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'coveralls', '~> 0.8.20'
Expand Down