Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Last active January 26, 2018 13:40
Show Gist options
  • Select an option

  • Save lmiller1990/c5fb0f095889836b5b91bbb54e4866dc to your computer and use it in GitHub Desktop.

Select an option

Save lmiller1990/c5fb0f095889836b5b91bbb54e4866dc to your computer and use it in GitHub Desktop.
<template>
<div>
<CreatePostLayout @submit="handleCreatePost">
<CreateDescription
slot="description"
v-model="content"
/>
<SubmitButton
slot="submit"
:submitted="submitted"
/>
</CreatePostLayout>
</div>
</template>
<script>
import steem from 'steem'
import CreatePostLayout from './CreatePostLayout'
import CreateDescription from './CreateDescription'
import SubmitButton from '@/components/shared/SubmitButton'
export default {
name: 'CreateContainer',
components: {
CreatePostLayout,
CreateDescription,
SubmitButton
},
data () {
return {
content: '',
submitted: false
}
},
created () {
steem.api.setOptions({ url: 'https://api.steemit.com' })
},
methods: {
handleCreatePost () {
const key = 'your key here'
steem.broadcast.comment(
key,
'',
'test',
'xenetics',
'instagram-clone-steem',
'A test post for creating a Instagram clone',
'This is a test post for a series about creating a Instgram like website on the Steem blockchain. More here: steemit.com/@xenetics',
{ tags: ['test', 'test-2', 'test-3'] },
(err, result) => {
if (!err) {
console.log('Result', result)
}
}
)
}
}
}
</script>
<style scoped>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment