Skip to content

andy-miles/tvmaze-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


The TVDB Logo
tvmaze.com

tvmaze-java-client

A client to access the TVMaze API
Maven Project Info - Javadoc
Report Bug - Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Recipes
  4. Contributing
  5. License
  6. Contact

About The Project

An easy-to-use java client to access the TVMaze API for programmatic access to TV show, episode and cast/crew information.

Recipes

Instantiation

TvMaze client = new TvMaze();
SeasonApi searchApi = client.getSearchApi();
List<ShowResult> results = searchApi.searchShows("friends");

Customizing the HTTP client configuration

OkHttpClientBuilder example

If your use-case requires configuring the underlying OkHttpClient instance (e.g., configuring your own SSL cert verification, proxy, and/or connection timeouts), you can configure the client with the provided OkHttpClientBuilder, or alternatively with OkHttp's builder.

OkHttpClient httpClient = OkHttpClientBuilder.builder()
        .trustManager(myX509TrustManager) // Custom trust manager for self/internally signed SSL/TLS certs
        .hostnameVerifier(myHostnameVerifier) // Custom hostname verification for SSL/TLS endpoints
        .proxy(myProxy, myProxyUsername, myProxyPassword) // Proxy config
        .connectTimeout(8000L) // connection timeout in milliseconds
        .readTimeout(5000L) // read timeout in milliseconds
        .writeTimeout(5000L) // write timeout in milliseconds
        .build();
Connection connection = Connection.builder()
        .httpClient(httpClient)
        .gsonFactory(GsonFactory.getInstance())
        .build();
TvMaze client = new TvMaze(connection);

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPLv3 license. See LICENSE for more information.

Contact

Andy Miles - andy.miles (at) amilesend.com

Project Link: https://github.com/andy-miles/tvmaze-java-client