コード例 #1
0
        public JsonResult PostLogin([FromBody] Login login)
        {
            Console.WriteLine("API key is: " + login.XApiKey);
            TokenResponse bearerToken = CheetahHandler.PostLogin(login);

            AssetMatcher.UpdateAssets(bearerToken.Jwt);
            return(Json(bearerToken));
        }
コード例 #2
0
        public void MatchLessThanFiveResultsTest()
        {
            Login  login       = LoadLogin();
            string bearerToken = CheetahHandler.PostLogin(login).Jwt;

            Assert.NotNull(bearerToken);

            AssetMatcher.UpdateAssets(bearerToken);


            List <AssetLookupResponse> results = AssetMatcher.GetMatches("Ap");

            foreach (AssetLookupResponse result in results)
            {
                output.WriteLine(result.value.issuer);
            }
            Assert.Equal(2, results.Count);
        }