Googleapis Client

Library ini di buat agar mempermudah kalian menggunakan googleapis karena library official sulit terutama bagi orang baru / awam / pemula.


Membuat Secret Api Key

  1. Service Account
    • Buka browser kamu console.cloud.google.com
    • Bikin Project / Pilih Project
    • Buka Tab Api & services
    • Tap Create Credentials
    • Pilih Service Account

instruksi Full Silahkan liat video di bawah ini

create_service_account_googleapis.webm


Install library

dart pub add googleapis_client

Add Library

import 'package:googleapis_client/googleapis_client.dart';

Documentation

Jika kamu tidak memiliki banyak kuota internet kamu bisa melihat dokumentasi menggunakan cara ini

git clone https://github.com/azkadev/googleapis_client.git
cd googleapis_client
cd web
flutter clean
flutter pub get
flutter run

Quickstart

import 'dart:convert';
import 'package:googleapis_client/googleapis_client.dart';

void prettyPrint(dynamic data) {
  if (data is Map || data is List) {
    print(JsonEncoder.withIndent(" " * 2).convert(data));
  } else {
    print(data.toString());
  }
}

void main(List<String> args) async { 
  GoogleApisClient googleApisClient = GoogleApisClient(
    googleApisClientApiKey: GoogleApisClientApiKey(
      {
        "type": "service_account",
        "project_id": "nod",
        "private_key_id": "",
        "private_key": "-----BEGIN -----END PRIVATE KEY-----\n",
        "client_email": "mkkm",
        "client_id": "1580",
        "auth_uri": "https://o/oauth2/auth",
        "token_uri": "https:/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_x509_cert_url": "",
        "universe_domain": "",
      },
    ),
  );

  await googleApisClient.youtube.subscribeChannel(channel: "@azkadev");
  await googleApisClient.youtube.addComment(videoId: "HV4kn5j7IwQ", text: "Hai ini pesan automatis");

  // with dart class scheme
  await googleApisClient.request(
    requestData: YoutubeGetChannel.create(
      special_type: "youtubeGetChannel",
      channel_id: "@azkadev",
    ),
  );
  // with dart class scheme
  await googleApisClient.request(
    requestData: JsonApis({
      "@type": "youtubeSubscribeChannel",
      "@client_channel": "",
      "channel_id": "@azkadev",
    }),
  );

  await googleApisClient.request(
    requestData: JsonApis({
      "@type": "gmailSendMessage",
      "email_id": "email@gmail.com",
      "text": "",
    }),
  );
}

Example client use this library

Libraries

apis/apis
apis/gmail_forward_message
apis/gmail_send_message
apis/json_dart
apis/youtube_get_channel
apis/youtube_get_channel_by_video
apis/youtube_get_channel_full_info
apis/youtube_get_channel_video
apis/youtube_get_query_suggestions
apis/youtube_get_video
apis/youtube_get_video_comments
apis/youtube_subscribe_channel
apis/youtube_unsubscribe_channel
fork/youtube_explode_dart/src/channels/channel
fork/youtube_explode_dart/src/channels/channel_about
fork/youtube_explode_dart/src/channels/channel_client
fork/youtube_explode_dart/src/channels/channel_handle
fork/youtube_explode_dart/src/channels/channel_id
fork/youtube_explode_dart/src/channels/channel_uploads_list
fork/youtube_explode_dart/src/channels/channel_video
fork/youtube_explode_dart/src/channels/username
fork/youtube_explode_dart/src/channels/video_sorting
fork/youtube_explode_dart/src/channels/video_type
fork/youtube_explode_dart/src/common/base_paged_list
fork/youtube_explode_dart/src/common/common
fork/youtube_explode_dart/src/common/engagement
fork/youtube_explode_dart/src/common/thumbnail
fork/youtube_explode_dart/src/common/thumbnail_set
fork/youtube_explode_dart/src/exceptions/exceptions
fork/youtube_explode_dart/src/exceptions/fatal_failure_exception
fork/youtube_explode_dart/src/exceptions/http_client_closed
fork/youtube_explode_dart/src/exceptions/request_limit_exceeded_exception
fork/youtube_explode_dart/src/exceptions/search_item_section_exception
fork/youtube_explode_dart/src/exceptions/transient_failure_exception
fork/youtube_explode_dart/src/exceptions/video_requires_purchase_exception
fork/youtube_explode_dart/src/exceptions/video_unavailable_exception
fork/youtube_explode_dart/src/exceptions/video_unplayable_exception
fork/youtube_explode_dart/src/exceptions/youtube_explode_exception
fork/youtube_explode_dart/src/extensions/helpers_extension
fork/youtube_explode_dart/src/js/js_engine
fork/youtube_explode_dart/src/js/jsparser/jsparser
fork/youtube_explode_dart/src/js/jsparser/src/annotations
fork/youtube_explode_dart/src/js/jsparser/src/ast
fork/youtube_explode_dart/src/js/jsparser/src/charcode
fork/youtube_explode_dart/src/js/jsparser/src/lexer
fork/youtube_explode_dart/src/js/jsparser/src/noise
fork/youtube_explode_dart/src/js/jsparser/src/parser
fork/youtube_explode_dart/src/playlists/playlist
fork/youtube_explode_dart/src/playlists/playlist_client
fork/youtube_explode_dart/src/playlists/playlist_id
fork/youtube_explode_dart/src/retry
fork/youtube_explode_dart/src/reverse_engineering/cipher/cipher_manifest
fork/youtube_explode_dart/src/reverse_engineering/cipher/cipher_operations
fork/youtube_explode_dart/src/reverse_engineering/clients/closed_caption_client
fork/youtube_explode_dart/src/reverse_engineering/clients/comments_client
fork/youtube_explode_dart/src/reverse_engineering/dash_manifest
fork/youtube_explode_dart/src/reverse_engineering/heuristics
fork/youtube_explode_dart/src/reverse_engineering/hls_manifest
fork/youtube_explode_dart/src/reverse_engineering/models/fragment
fork/youtube_explode_dart/src/reverse_engineering/models/initial_data
fork/youtube_explode_dart/src/reverse_engineering/models/stream_info_provider
fork/youtube_explode_dart/src/reverse_engineering/models/youtube_page
fork/youtube_explode_dart/src/reverse_engineering/pages/channel_about_page
fork/youtube_explode_dart/src/reverse_engineering/pages/channel_page
fork/youtube_explode_dart/src/reverse_engineering/pages/channel_upload_page
fork/youtube_explode_dart/src/reverse_engineering/pages/player_config_base
fork/youtube_explode_dart/src/reverse_engineering/pages/playlist_page
fork/youtube_explode_dart/src/reverse_engineering/pages/search_page
fork/youtube_explode_dart/src/reverse_engineering/pages/watch_page
fork/youtube_explode_dart/src/reverse_engineering/player/player_response
fork/youtube_explode_dart/src/reverse_engineering/player/player_source
fork/youtube_explode_dart/src/reverse_engineering/youtube_http_client
fork/youtube_explode_dart/src/search/search_client
fork/youtube_explode_dart/src/search/search_filter
fork/youtube_explode_dart/src/search/search_list
fork/youtube_explode_dart/src/search/search_query
fork/youtube_explode_dart/src/search/search_result
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_client
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_format
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_manifest
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_part
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_track
fork/youtube_explode_dart/src/videos/closed_captions/closed_caption_track_info
fork/youtube_explode_dart/src/videos/closed_captions/closed_captions
fork/youtube_explode_dart/src/videos/closed_captions/language
fork/youtube_explode_dart/src/videos/comments/comment
fork/youtube_explode_dart/src/videos/comments/comments
fork/youtube_explode_dart/src/videos/comments/comments_client
fork/youtube_explode_dart/src/videos/comments/comments_list
fork/youtube_explode_dart/src/videos/streams/mixins/audio_stream_info
fork/youtube_explode_dart/src/videos/streams/mixins/hls_stream_info
fork/youtube_explode_dart/src/videos/streams/mixins/stream_info
fork/youtube_explode_dart/src/videos/streams/mixins/video_stream_info
fork/youtube_explode_dart/src/videos/streams/models/audio_track
fork/youtube_explode_dart/src/videos/streams/models/bitrate
fork/youtube_explode_dart/src/videos/streams/models/filesize
fork/youtube_explode_dart/src/videos/streams/models/framerate
fork/youtube_explode_dart/src/videos/streams/models/stream_container
fork/youtube_explode_dart/src/videos/streams/models/video_quality
fork/youtube_explode_dart/src/videos/streams/models/video_resolution
fork/youtube_explode_dart/src/videos/streams/stream_client
fork/youtube_explode_dart/src/videos/streams/stream_controller
fork/youtube_explode_dart/src/videos/streams/stream_manifest
fork/youtube_explode_dart/src/videos/streams/streams
fork/youtube_explode_dart/src/videos/streams/types/audio_only_stream_info
fork/youtube_explode_dart/src/videos/streams/types/hls/hls_audio_stream_info
fork/youtube_explode_dart/src/videos/streams/types/hls/hls_muxed_stream_info
fork/youtube_explode_dart/src/videos/streams/types/hls/hls_video_stream_info
fork/youtube_explode_dart/src/videos/streams/types/muxed_stream_info
fork/youtube_explode_dart/src/videos/streams/types/video_only_stream_info
fork/youtube_explode_dart/src/videos/video
fork/youtube_explode_dart/src/videos/video_client
fork/youtube_explode_dart/src/videos/video_controller
fork/youtube_explode_dart/src/videos/video_id
fork/youtube_explode_dart/src/videos/youtube_api_client
fork/youtube_explode_dart/src/youtube_explode_base
fork/youtube_explode_dart/test
fork/youtube_explode_dart/youtube_explode_dart
Provides all the APIs implemented by this library.
gmail/gmail
gmail/gmail_core
google_apis_client_key
googleapis_client
googleapis_client_core
googleapis_client_raw/google_apis_client_raw
googleapis_client_raw/google_apis_client_raw_core
packages/google_auth
packages/google_auth_io
packages/packages
scheme/json_dart
scheme/scheme
scheme/service_account
scheme/youtube_channel
scheme/youtube_channel_full_info
scheme/youtube_channel_thumbnails
scheme/youtube_channel_videos
scheme/youtube_schema_text
scheme/youtube_search_suggestions
scheme/youtube_search_videos
scheme/youtube_video
scheme/youtube_video_comment
scheme/youtube_video_comments
scheme/youtube_video_engagement
scheme/youtube_video_manifest
scheme/youtube_video_manifest_audio
scheme/youtube_video_manifest_muxed
scheme/youtube_video_manifest_stream
scheme/youtube_video_manifest_video
scheme/youtube_video_thumbnails
scopes/scopes
sheets/sheets
sheets/sheets_core
utils/utils
youtube/youtube
youtube/youtube_core
youtube/youtube_no_auth

Channels

fork/youtube_explode_dart/src/channels/channels Channels
APIs related to YouTube channels.

Playlists

fork/youtube_explode_dart/src/playlists/playlists Playlists
APIs related to YouTube playlists.

Search

fork/youtube_explode_dart/src/search/search Search
APIs related to YouTube search queries.

Videos

fork/youtube_explode_dart/src/videos/videos Videos
APIs related to YouTube videos.