Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions differential.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ func (c *Conn) DifferentialGetRawDiff(req requests.DifferentialGetRawDiffRequest

return &res, nil
}

// DifferentialSetDiffProperty performs a call to differential.setdiffproperty
func (c *Conn) DifferentialSetDiffProperty(req requests.DifferentialSetDiffPropertyRequest) error {
var res *responses.Empty
if err := c.Call("differential.setdiffproperty", &req, &res); err != nil {
return err
}

return nil
}
12 changes: 12 additions & 0 deletions requests/differential_setdiffproperty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package requests

// DifferentialSetDiffPropertyRequest represents a request to the differential.setdiffproperty endpoint.
type DifferentialSetDiffPropertyRequest struct {
// ID of the diff (not revision) to set the property on.
DiffID uint64 `json:"diff_id"`
// Name of the property to set
Name string `json:"name"`
// Value of the property. Must be a JSON-encoded string representing an object or array of objects.
Data string `json:"data"`
Request
}
4 changes: 4 additions & 0 deletions responses/empty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package responses

// Empty represents an empty response
type Empty struct{}
Loading