Ejemplo n.º 1
0
        public static async Task GetVectorPronunciation(FaunaClient client, string twitchdisplayname)
        {
            Value result = await client.Query(
                Get(
                    Match(Index("vectorprounciation_get_twitch_user"), twitchdisplayname)));

            TwitchUsers twitchusers = Decoder.Decode <TwitchUsers>(result.At("data"));

            Console.WriteLine("{0} : {1}", twitchusers.VectorProronunciation, twitchusers.TwitchDisplayName);
        }
Ejemplo n.º 2
0
        public static async Task GetVectorPronunciationAll(FaunaClient client)
        {
            Value value = await client.Query(Paginate(Match(Index("vpronunciation"))));


            TwitchUsers twitchUsers = value.At("data").To <TwitchUsers>().Value;

            Console.WriteLine(" loaded: {0}", twitchUsers.VectorProronunciation);

            //Value result = await client.Query(
            //            Get(
            //            Match(Index("vpronunciation"))));

            //IResult<Value> data = result.At("data").To<Value>();

            //data.Match(
            //    Success: value => ProcessData(value),
            //    Failure: reason => Console.WriteLine($"Something went wrong: {reason}")
            //);

            //TwitchUsers twitchusers = (TwitchUsers)result.At("data").To<TwitchUsers>();
            //Console.WriteLine(twitchusers.TwitchDisplayName);
        }