Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F13780150
import.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
620 B
Subscribers
None
import.go
View Options
package
wfimport
import
"github.com/writeas/go-writeas"
type
Import
struct
{
writeas
.
User
Collections
[]
writeas
.
Collection
`json:"collections"`
Posts
[]
writeas
.
Post
`json:"posts"`
}
// CreatePost publishes a post from the given writeas.Post.
func
CreatePost
(
cl
*
writeas
.
Client
,
p
writeas
.
Post
,
collAlias
string
)
(
*
writeas
.
Post
,
error
)
{
return
cl
.
CreatePost
(
&
writeas
.
PostParams
{
Slug
:
p
.
Slug
,
Title
:
p
.
Title
,
Content
:
p
.
Content
,
Font
:
p
.
Font
,
Language
:
p
.
Language
,
IsRTL
:
p
.
RTL
,
Created
:
&
p
.
Created
,
Updated
:
&
p
.
Updated
,
Collection
:
collAlias
,
})
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 30, 9:57 AM (5 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3610444
Attached To
rWFM wfmigrate
Event Timeline
Log In to Comment