定制 khant-nyar/tmdb_wrapper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

khant-nyar/tmdb_wrapper

最新稳定版本:1.0.0

Composer 安装命令:

composer require khant-nyar/tmdb_wrapper

包简介

tmdb

README 文档

README

The TMDB Wrapper package is a convenient Laravel wrapper for interacting with The Movie Database (TMDb) API. It provides easy-to-use methods to fetch movies, TV series, and their details.

Installation

You can install the package via Composer:

  composer require khant-nyar/tmdb_wrapper

Configuration

After installing the package, you need to publish the configuration file and set your TMDb API key:

php artisan vendor:publish --provider="KhantNyar\TmdbWrapper\TmdbWrapperServiceProvider"

Add your TMDb API key to the .env file:

TMDB_API_KEY=your_tmdb_api_key

Usage/Examples

public function fetchMovies(Request $request)
    {
        $searchKey = $request->input('search_key', 'Man of Steel');
        $movies = TmdbService::fetchMovies($searchKey);
        dd($movies);
        return response()->json(['movies' => $movies]);
    }

    public function fetchTVSeries(Request $request)
    {
        $searchKey = $request->input('search_key', 'Super Natural');
        $tvSeries = TmdbService::fetchTVSeries($searchKey);

        return response()->json(['tv_series' => $tvSeries]);
    }

    public function fetchMovieDetails(){
        $id = 49521;
        $details = TmdbService::fetchMovieDetails($id);
        return response()->json($details);
    }
    public function fetchTVSerieDetails(){
        $id = 157202;
        $details = TmdbService::fetchTVSerieDetails($id);
        return response()->json($details);
    }

License

MIT

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Support

For support, give a star and forge my repo .contact :khantnyar.dev@gmail.com

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-21