Commit 56c3f133 authored by Morgan McMillian's avatar Morgan McMillian

adjust SetMarker to use correct method fixes #6

parent a460ff02
......@@ -12,6 +12,6 @@ type MarkersResult struct {
// https://pnut.io/docs/api/resources/stream-marker#post-markers
func (c *Client) SetMarker(json string) (result MarkersResult, err error) {
responseCh := make(chan response)
c.queryQueue <- query{url: MarkerAPI, data: &result, method: "PUT", responseCh: responseCh, json: json}
c.queryQueue <- query{url: MarkerAPI, data: &result, method: "POST", responseCh: responseCh, json: json}
return result, (<-responseCh).err
}
......@@ -10,7 +10,7 @@ func TestSetMarker(t *testing.T) {
if err != nil {
t.Error(err)
}
marker := `{"id":"106930","name":"channel:1001"}`
marker := `[{"id":"106930","name":"channel:1001"}]`
client := NewClient(config.ClientID, "")
client.SetAccessToken(config.AccessToken)
res, err := client.SetMarker(marker)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment