Skip to content

Set up project

Vasily Vasilyev edited this page Jul 6, 2019 · 35 revisions

ThingAppraiser set up guide

Dependencies

Target .NET Standard is 2.0 for libraries, .NET Core is 2.2 for web services and .NET Framework is 4.7.2 for desktop app. Version of C# is 7.1.

You can install all dependencies using NuGet package manager.

Installation guide

.NET Framework

Download and install .NET Framework 4.7.2 (official link).

.NET Core

Download and install .NET Core 2.2 (official link). Feel free to install any minor version of .NET Core but we recommend to use .NET Core SDK latest version that is compatible with Visual Studio 2017 (download here).

Note: also this .NET Core SDK allows you to create .NET Standard libraries.

Database

ThingAppraiser uses MS SQL database to store some intermediate data during appraising. That means you should install Microsoft SQL Server. You can install any edition that you want but we use MS SQL Server 2017 Express. All instructions can be found here.

After installation you should create database with name "thing_appraiser" and run SQL script from folder:

  • ThingAppraiser/Library/DAL/SQLScripts/InitialScript.sql

Then specify your connection string (i.e. node with key is "ConnectionString" and value is content of connection string, example you can see here) in files:

  • ThingAppraiser/WebServices/ConfigurationWebService/App.config
  • ThingAppraiser/Library/Core/App.config
  • ThingAppraiser/Applications/ConsoleApp/App.config
  • ThingAppraiser/Applications/DesktopApp/App.config

Note: we recommend to install SQL Server Management Studio (https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017) because it actually makes it much easier to work with MS SQL Server.

Google Drive

One of option to load user data is Google Drive. We use OAuth 2.0 Protocol to interact with it. You should read instructions how to acquire client IDs and secrets here. Choose "Installed application client IDs" and follow the steps. When you get credentials download it as json-file and rename to "credentials.json". Put this file to:

  • ThingAppraiser/Library/Core/
  • ThingAppraiser/WebServices/ProcessingWebService/

Finally, when users (or you during debugging) connect to Google Drive at first time they should enter their account login and password and allow ThingAppraiser app use files from Google Drive if they want to load data from Google Drive directly.

Environment variables

Depends on what services you want to use, almost always you need to get API keys/tokens for them. All keys and tokens set as environment variable value with key "ThingAppraiser" (we are going to add other ways to configure service later). Further you can find some instructions how to get credentials for some of the services with which the ThingAppraiser can interact.

You should set environment variable for project on your machine. Variable name (key) is "ThingAppraiser", variable value is depend on services. Example of some services keys/tokens format (for Windows): "BotToken=YOUR_BOT_TOKEN;TmdbApiKey=YOUR_TMDB_API_KEY;OmdbApiKey=YOUR_OMDB_API_KEY;SteamApiKey=YOUR_STEAM_API_KEY".

Settings for Telegram bot service

If you want to use Telegram bot as one of the ThingAppraiser means of communication with the user, you should create bot and set token in environment variable values (remember that variable name (key) is "ThingAppraiser"). Official guide how to create bot and get token. Example: "BotToken=YOUR_BOT_TOKEN".

Next step is set Webhook because it is the way in which Telegram sends notifications and other messages to ThingAppraiser services. Full instruction you can read here.

Note: in addition, Telegram is banned in some countries. So you should configure your VPN or Proxy to get around the lockdown (now we does not support such option).

TMDB service

For movie and series processing ThingAppraiser can use TMDB service. Official introduction guide you can read here. Also you should set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "TmdbApiKey=YOUR_TMDB_API_KEY".

Note: please, do not forget that such services as TMDB (or OMDB) have own limits on API calls per day or month. More information you can read in official resources of services that you use in ThingAppraiser.

OMDB

Other way to work with movie and series for ThingAppraiser is OMDB. Official guide you can read here. Set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "OmdbApiKey=YOUR_OMDB_API_KEY".

Steam

It is important to mention that ThingAppraiser do not use Steam API key for API calls because Steam allows some calls without specifying key. But if you want to use all opportunities of Steam API, which is not officially documented by the way, you should get API key. Instructions you can find here. Set your API key in environment variable values (remember that variable name (key) is "ThingAppraiser"). Example: "SteamApiKey=YOUR_STEAM_API_KEY".

Launch

ThingAppraiser has three ways of communication with user:

  • Desktop application;
  • Console application;
  • Telegram bot service.

Desktop app and Telegram bot service cannot appraise data and used for data visualization. They send requests to ThingAppraiser Web services and process responses. On the other hand, Console app uses ThingAppraiser Library directly (at this moment). That is why you should launch desktop app and Telegram bot service with Web services but Console can be started without other services.

Clone this wiki locally