Implement api client and add first test call to create api

This commit is contained in:
Tim
2021-07-05 01:34:57 +02:00
parent 775fa68909
commit 9b76a4e3ca
4 changed files with 55 additions and 4 deletions

View File

@ -7,12 +7,20 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import PerudoApi from "@/services/PerudoApi";
import {CreateGameObject} from "@/objects/objects"; // @ is an alias to /src
@Component({
components: {
HelloWorld
}
})
export default class Home extends Vue {}
export default class Home extends Vue {
public mounted() {
PerudoApi.instance.createGame('Tosti').then((response: CreateGameObject) => {
console.log(response);
})
}
}
</script>