Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lib/discourse_api/api/topics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ def create_topic(args = {})
API
.params(args)
.required(:title, :raw)
.optional(:skip_validations, :category, :auto_track, :created_at, :api_username, :tags)
.optional(
:skip_validations,
:category,
:auto_track,
:created_at,
:api_username,
:tags,
:external_id,
)
post("/posts", args.to_h)
end

Expand Down Expand Up @@ -111,6 +119,10 @@ def bookmark_topic(topic_id)
def remove_topic_bookmark(topic_id)
put("/t/#{topic_id}/remove_bookmarks.json")
end

def get_topic_url_by_external_id(external_id)
get("/t/external_id/#{external_id}")
end
end
end
end