Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F13779665
import.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
624 B
Subscribers
None
import.go
View Options
package
wfmigrate
import
"github.com/writeas/go-writeas/v2"
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, 4:48 AM (16 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3610191
Attached To
rWFM wfmigrate
Event Timeline
Log In to Comment