diff --git a/entry.go b/entry.go index 368312d..a968e02 100644 --- a/entry.go +++ b/entry.go @@ -69,13 +69,13 @@ func (service *EntriesService) List(spaceID string) *Collection { col := NewCollection(&CollectionOptions{}) col.c = service.c col.req = req - + return col } // Get returns a single entry func (service *EntriesService) Get(spaceID, entryID string) (*Entry, error) { - path := fmt.Sprintf("/spaces/%s/entries/%s", spaceID, entryID) + path := fmt.Sprintf("/spaces/%s/environments/%s/entries/%s", spaceID, service.c.Environment, entryID) query := url.Values{} method := "GET" diff --git a/space.go b/space.go index 167e16c..1effe01 100644 --- a/space.go +++ b/space.go @@ -21,9 +21,11 @@ type Space struct { // MarshalJSON for custom json marshaling func (space *Space) MarshalJSON() ([]byte, error) { return json.Marshal(&struct { + Sys *Sys `json:"sys,omitempty"` Name string `json:"name,omitempty"` DefaultLocale string `json:"defaultLocale,omitempty"` }{ + Sys: space.Sys, Name: space.Name, DefaultLocale: space.DefaultLocale, })