tamatem_plus

A flutter project that RESTful integrates Tamatem Plus.

Features

  1. Implemented RESTful APIs for TamatemPlus:

    1. Launch browser to TamatemPlus for authorization
    2. Obtain the Token
    3. Connect TamatemPlus
    4. Query inventory items
    5. Get GamePlayer info
    6. Redeem inventory items
    7. Logout

Getting started

flutter pub add tamatem_plus(TODO)

Usage

  1. Add ".env" file in the root of App project:
TAMATEM_DOMAIN={TAMATEM_DOMAIN}
TAMATEM_CLIENT_ID={TAMATEM_CLIENT_ID}
TAMATEM_CUSTOM_SCHEME={TAMATEM_CUSTOM_SCHEME}
TAMATEM_GAME_STORE={TAMATEM_GAME_STORE}

TAMATEM_CUSTOM_SCHEME is the deeplink scheme of the application:

{companyname}-{gamename}://{companyname}

Based on the relevant information provided, TamatemPlus provides the following fields:

TAMATEM_DOMAIN is the API domain name, for example, https://stg-be.tamatemplus.com/

TAMATEM_CLIENT_ID is the application's ID

TAMATEM_GAME_STORE is a game store link configured by game manufacturer


then included asset with your application,

flutter:
  assets:
    - .env
  1. Init the plugin at beginning of you app launch:
void main() async {
  await TamatemPlusPlugin.init();

  runApp(const MyApp());
}
  1. Embed TamatemButton in the layout, then customize button if needed.
TamatemButton(
    child: Text(
        'Launch tamatem',
        style: TextStyle(color: Colors.red),
    ),
)

License

   Copyright 2023 kuloud

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.