Exemple #1
0
func (c *Client) Projects() fmt.Stringer {
	response := responses.Projects{}
	responseBody := c.executeRequest(c.resolver.ProjectsRequestURL())
	response.Parse(responseBody)
	return presenters.Projects{response.Projects()}
}
Exemple #2
0
package responses_test

import (
	. "github.com/pivotal/gumshoe/repos/ginkgo"
	. "github.com/pivotal/gumshoe/repos/gomega"
	"github.com/pivotal/gumshoe/trackerapi/responses"
)

var _ = Describe("Projects Response", func() {
	var (
		response responses.Projects
	)

	BeforeEach(func() {
		response = responses.Projects{}
		responseBody := `[
           {
               "id": 98,
               "current_iteration_number": 1,
               "name": "Learn About the Force"
           },
           {
               "id": 99,
               "description": "Expeditionary Battle Planetoid",
               "current_iteration_number": 15,
               "name": "Death Star"
           }
        ]`
		response.Parse([]byte(responseBody))
	})