Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Ruby Client for JustWatch API
If you are using Rails, the better way is to define an initializer in config/initializers
, defining the default locale and the token (we encourage to not push the token to the repo).
# config/initializers/justwatch.rb
JustWatch::Api.locale = 'es_ES'
JustWatch::Api.token = ENV.fetch('JUSTWATCH_API_TOKEN', nil)
The locale defined here is the default, you can override it in the different calls.
We can fetch the data for providers with the following call:
JustWatch::Provider.list(locale:)
Parameter | Explanation | Example values |
---|---|---|
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the genre list with the following call:
JustWatch::Genre.list(locale:)
Parameter | Explanation | Example values |
---|---|---|
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the country list with the following call:
JustWatch::Country.list(locale:)
Parameter | Explanation | Example values |
---|---|---|
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a movie using a service ID with the following call:
JustWatch::Movie.offers_by_id(id:, service_id_type:, locale:)
Parameter | Explanation | Example values |
---|---|---|
id | TMDB, IMDB or Justwatch ID | 12345 , tt0125439 , 39130 |
service_id_type | Service for which the ID has been provided | tmdb , imdb or justwatch |
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a movie using title and year with the following call:
JustWatch::Movie.offers_by_title_and_year(title:, year:, locale: Api.locale)
Parameter | Explanation | Example values |
---|---|---|
title | Movie title | 12 monkeys , The Shining |
year | Movie release year | 1999 , 2021 |
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a tv show using a service ID with the following call:
JustWatch::TvShow.offers_by_id(id:, service_id_type:, locale:)
Parameter | Explanation | Example values |
---|---|---|
id | TMDB, IMDB or Justwatch ID | 12345 , tt0125439 , 39130 |
service_id_type | Service for which the ID has been provided | tmdb , imdb or justwatch |
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a tv show using the tv show title and the year with the following call:
JustWatch::TvShow.offers_by_title_and_year(title:, year:, locale:)
Parameter | Explanation | Example values |
---|---|---|
title | Tv show title | House , Lost |
year | Tv show release year | 2004 , 2021 |
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a season using the tv show ID and the season number with the following call:
JustWatch::Season.offers_by_id_and_season_number(id:, service_id_type:, season_number:, locale:)
Parameter | Explanation | Example values |
---|---|---|
id | TMDB, IMDB or Justwatch tv show ID | 12345 , tt0125439 , 39130 |
service_id_type | Service for which the ID has been provided | tmdb , imdb or justwatch |
locale (optional) | Locale you are searching for | es_ES , en_US |
We can fetch the data for a season using the tv show tv show title, year and season number with the following call:
JustWatch::Season::offers_by_title_year_and_season_number(title:, year:, season_number:, locale:)
Parameter | Explanation | Example values |
---|---|---|
title | Tv show title | House , Lost |
year | Tv show release year | 2004 , 2021 |
season_number | Tv show season number | 1 , 2 |
locale (optional) | Locale you are searching for | es_ES , en_US |
Your JustWatch account is restricted to a bunch of locales. If you are getting Unauthorized errors this could be the reason.
FAQs
Unknown package
We found that justwatch_client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.