Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unmarshal error #4

Merged
merged 1 commit into from
Feb 24, 2016
Merged

Fix unmarshal error #4

merged 1 commit into from
Feb 24, 2016

Conversation

y0ug
Copy link

@y0ug y0ug commented Feb 24, 2016

Fix

  • Unmarshal error inside ShowRating and Status_ structure
  • Update and pass eztv_test.go file to reflect new json

Test program of the library

import (
        "fmt"
        "github.com/kr/pretty"
        eztv "github.com/y0ug/eztv"
)

func main() {
        // Test if the API is up
        fmt.Printf("eztv.Ping()\n")
        status, err := eztv.Ping()
        if err != nil {
                panic(err)
        }
        pretty.Println(status)

        fmt.Printf("eztv.SearchShow()\n")
        list, err := eztv.SearchShow("black mirror")
        if err != nil {
                panic(err)
        }
        pretty.Println(list)

        fmt.Printf("eztv.GetShowDetails\n")
        show, err := eztv.GetShowDetails("tt2149175")
        if err != nil {
                panic(err)
        }
        pretty.Println(show)

        // Get the first episode of the second season of tt2085059
        fmt.Printf("eztv.GetEpisode\n")
        e, err := eztv.GetEpisode("tt2085059", 2, 1)
        if err != nil {
                panic(err)
        }
        pretty.Println(e)

        // Get all the episodes of the second season of tt2085059
        fmt.Printf("eztv.GetSeason\n")
        showList, err := eztv.GetSeason("tt2085059", 2)
        if err != nil {
                panic(showList)
        }
        pretty.Println(show)
}

@@ -129,6 +131,7 @@ func GetShowDetails(ImdbID string) (*Show, error) {
return nil, err
}

fmt.Print(u.String())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to remove this log

@y0ug
Copy link
Author

y0ug commented Feb 24, 2016

Log line removed and branch rebase

gregdel added a commit that referenced this pull request Feb 24, 2016
@gregdel gregdel merged commit 7ba1e25 into odwrtw:master Feb 24, 2016
@gregdel
Copy link
Member

gregdel commented Feb 24, 2016

Merged, thanks for your contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants