Skip to content
Permalink
Browse files

Add go modules, add better error for currency retrieval

  • Loading branch information...
Raggaer committed May 12, 2019
1 parent 5d08796 commit 8de3d5692eae71f3bb53710c21f7209c0ccf6d4a
Showing with 29 additions and 161,354 deletions.
  1. +0 −65 Gopkg.lock
  2. +0 −38 Gopkg.toml
  3. +11 −0 go.mod
  4. +11 −0 go.sum
  5. +7 −0 trade/exchange.go
  6. +0 −1 vendor/github.com/PuerkitoBio/goquery/.gitattributes
  7. +0 −16 vendor/github.com/PuerkitoBio/goquery/.gitignore
  8. +0 −16 vendor/github.com/PuerkitoBio/goquery/.travis.yml
  9. +0 −12 vendor/github.com/PuerkitoBio/goquery/LICENSE
  10. +0 −179 vendor/github.com/PuerkitoBio/goquery/README.md
  11. +0 −124 vendor/github.com/PuerkitoBio/goquery/array.go
  12. +0 −123 vendor/github.com/PuerkitoBio/goquery/doc.go
  13. +0 −70 vendor/github.com/PuerkitoBio/goquery/expand.go
  14. +0 −163 vendor/github.com/PuerkitoBio/goquery/filter.go
  15. +0 −6 vendor/github.com/PuerkitoBio/goquery/go.mod
  16. +0 −5 vendor/github.com/PuerkitoBio/goquery/go.sum
  17. +0 −39 vendor/github.com/PuerkitoBio/goquery/iteration.go
  18. +0 −574 vendor/github.com/PuerkitoBio/goquery/manipulation.go
  19. +0 −275 vendor/github.com/PuerkitoBio/goquery/property.go
  20. +0 −49 vendor/github.com/PuerkitoBio/goquery/query.go
  21. +0 −698 vendor/github.com/PuerkitoBio/goquery/traversal.go
  22. +0 −141 vendor/github.com/PuerkitoBio/goquery/type.go
  23. +0 −161 vendor/github.com/PuerkitoBio/goquery/utilities.go
  24. +0 −14 vendor/github.com/andybalholm/cascadia/.travis.yml
  25. +0 −24 vendor/github.com/andybalholm/cascadia/LICENSE
  26. +0 −7 vendor/github.com/andybalholm/cascadia/README.md
  27. +0 −3 vendor/github.com/andybalholm/cascadia/go.mod
  28. +0 −835 vendor/github.com/andybalholm/cascadia/parser.go
  29. +0 −622 vendor/github.com/andybalholm/cascadia/selector.go
  30. +0 −3 vendor/golang.org/x/net/AUTHORS
  31. +0 −3 vendor/golang.org/x/net/CONTRIBUTORS
  32. +0 −27 vendor/golang.org/x/net/LICENSE
  33. +0 −22 vendor/golang.org/x/net/PATENTS
  34. +0 −78 vendor/golang.org/x/net/html/atom/atom.go
  35. +0 −712 vendor/golang.org/x/net/html/atom/gen.go
  36. +0 −783 vendor/golang.org/x/net/html/atom/table.go
  37. +0 −112 vendor/golang.org/x/net/html/const.go
  38. +0 −106 vendor/golang.org/x/net/html/doc.go
  39. +0 −156 vendor/golang.org/x/net/html/doctype.go
  40. +0 −2,253 vendor/golang.org/x/net/html/entity.go
  41. +0 −258 vendor/golang.org/x/net/html/escape.go
  42. +0 −226 vendor/golang.org/x/net/html/foreign.go
  43. +0 −220 vendor/golang.org/x/net/html/node.go
  44. +0 −2,311 vendor/golang.org/x/net/html/parse.go
  45. +0 −271 vendor/golang.org/x/net/html/render.go
  46. +0 −1,219 vendor/golang.org/x/net/html/token.go
  47. +0 −732 vendor/golang.org/x/net/idna/idna.go
  48. +0 −203 vendor/golang.org/x/net/idna/punycode.go
  49. +0 −4,557 vendor/golang.org/x/net/idna/tables.go
  50. +0 −72 vendor/golang.org/x/net/idna/trie.go
  51. +0 −119 vendor/golang.org/x/net/idna/trieval.go
  52. +0 −717 vendor/golang.org/x/net/publicsuffix/gen.go
  53. +0 −177 vendor/golang.org/x/net/publicsuffix/list.go
  54. +0 −9,753 vendor/golang.org/x/net/publicsuffix/table.go
  55. +0 −3 vendor/golang.org/x/text/AUTHORS
  56. +0 −3 vendor/golang.org/x/text/CONTRIBUTORS
  57. +0 −27 vendor/golang.org/x/text/LICENSE
  58. +0 −22 vendor/golang.org/x/text/PATENTS
  59. +0 −702 vendor/golang.org/x/text/collate/build/builder.go
  60. +0 −294 vendor/golang.org/x/text/collate/build/colelem.go
  61. +0 −309 vendor/golang.org/x/text/collate/build/contract.go
  62. +0 −393 vendor/golang.org/x/text/collate/build/order.go
  63. +0 −81 vendor/golang.org/x/text/collate/build/table.go
  64. +0 −290 vendor/golang.org/x/text/collate/build/trie.go
  65. +0 −403 vendor/golang.org/x/text/collate/collate.go
  66. +0 −32 vendor/golang.org/x/text/collate/index.go
  67. +0 −553 vendor/golang.org/x/text/collate/maketables.go
  68. +0 −239 vendor/golang.org/x/text/collate/option.go
  69. +0 −81 vendor/golang.org/x/text/collate/sort.go
  70. +0 −73,789 vendor/golang.org/x/text/collate/tables.go
  71. +0 −371 vendor/golang.org/x/text/internal/colltab/collelem.go
  72. +0 −105 vendor/golang.org/x/text/internal/colltab/colltab.go
  73. +0 −145 vendor/golang.org/x/text/internal/colltab/contract.go
  74. +0 −178 vendor/golang.org/x/text/internal/colltab/iter.go
  75. +0 −236 vendor/golang.org/x/text/internal/colltab/numeric.go
  76. +0 −275 vendor/golang.org/x/text/internal/colltab/table.go
  77. +0 −159 vendor/golang.org/x/text/internal/colltab/trie.go
  78. +0 −31 vendor/golang.org/x/text/internal/colltab/weighter.go
  79. +0 −369 vendor/golang.org/x/text/internal/gen/code.go
  80. +0 −333 vendor/golang.org/x/text/internal/gen/gen.go
  81. +0 −100 vendor/golang.org/x/text/internal/tag/tag.go
  82. +0 −58 vendor/golang.org/x/text/internal/triegen/compact.go
  83. +0 −251 vendor/golang.org/x/text/internal/triegen/print.go
  84. +0 −494 vendor/golang.org/x/text/internal/triegen/triegen.go
  85. +0 −371 vendor/golang.org/x/text/internal/ucd/ucd.go
  86. +0 −16 vendor/golang.org/x/text/language/Makefile
  87. +0 −16 vendor/golang.org/x/text/language/common.go
  88. +0 −197 vendor/golang.org/x/text/language/coverage.go
  89. +0 −102 vendor/golang.org/x/text/language/doc.go
  90. +0 −1,712 vendor/golang.org/x/text/language/gen.go
  91. +0 −20 vendor/golang.org/x/text/language/gen_common.go
  92. +0 −162 vendor/golang.org/x/text/language/gen_index.go
  93. +0 −38 vendor/golang.org/x/text/language/go1_1.go
  94. +0 −11 vendor/golang.org/x/text/language/go1_2.go
  95. +0 −783 vendor/golang.org/x/text/language/index.go
  96. +0 −907 vendor/golang.org/x/text/language/language.go
  97. +0 −396 vendor/golang.org/x/text/language/lookup.go
  98. +0 −933 vendor/golang.org/x/text/language/match.go
  99. +0 −859 vendor/golang.org/x/text/language/parse.go
  100. +0 −3,686 vendor/golang.org/x/text/language/tables.go
  101. +0 −143 vendor/golang.org/x/text/language/tags.go
  102. +0 −336 vendor/golang.org/x/text/secure/bidirule/bidirule.go
  103. +0 −11 vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go
  104. +0 −14 vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go
  105. +0 −705 vendor/golang.org/x/text/transform/transform.go
  106. +0 −198 vendor/golang.org/x/text/unicode/bidi/bidi.go
  107. +0 −335 vendor/golang.org/x/text/unicode/bidi/bracket.go
  108. +0 −1,058 vendor/golang.org/x/text/unicode/bidi/core.go
  109. +0 −133 vendor/golang.org/x/text/unicode/bidi/gen.go
  110. +0 −57 vendor/golang.org/x/text/unicode/bidi/gen_ranges.go
  111. +0 −64 vendor/golang.org/x/text/unicode/bidi/gen_trieval.go
  112. +0 −206 vendor/golang.org/x/text/unicode/bidi/prop.go
  113. +0 −1,815 vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go
  114. +0 −1,781 vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go
  115. +0 −60 vendor/golang.org/x/text/unicode/bidi/trieval.go
  116. +0 −105 vendor/golang.org/x/text/unicode/cldr/base.go
  117. +0 −130 vendor/golang.org/x/text/unicode/cldr/cldr.go
  118. +0 −359 vendor/golang.org/x/text/unicode/cldr/collate.go
  119. +0 −171 vendor/golang.org/x/text/unicode/cldr/decode.go
  120. +0 −400 vendor/golang.org/x/text/unicode/cldr/makexml.go
  121. +0 −602 vendor/golang.org/x/text/unicode/cldr/resolve.go
  122. +0 −144 vendor/golang.org/x/text/unicode/cldr/slice.go
  123. +0 −1,494 vendor/golang.org/x/text/unicode/cldr/xml.go
  124. +0 −508 vendor/golang.org/x/text/unicode/norm/composition.go
  125. +0 −259 vendor/golang.org/x/text/unicode/norm/forminfo.go
  126. +0 −109 vendor/golang.org/x/text/unicode/norm/input.go
  127. +0 −457 vendor/golang.org/x/text/unicode/norm/iter.go
  128. +0 −976 vendor/golang.org/x/text/unicode/norm/maketables.go
  129. +0 −609 vendor/golang.org/x/text/unicode/norm/normalize.go
  130. +0 −125 vendor/golang.org/x/text/unicode/norm/readwriter.go
  131. +0 −7,653 vendor/golang.org/x/text/unicode/norm/tables10.0.0.go
  132. +0 −7,633 vendor/golang.org/x/text/unicode/norm/tables9.0.0.go
  133. +0 −88 vendor/golang.org/x/text/unicode/norm/transform.go
  134. +0 −54 vendor/golang.org/x/text/unicode/norm/trie.go
  135. +0 −117 vendor/golang.org/x/text/unicode/norm/triegen.go
  136. +0 −115 vendor/golang.org/x/text/unicode/rangetable/gen.go
  137. +0 −260 vendor/golang.org/x/text/unicode/rangetable/merge.go
  138. +0 −70 vendor/golang.org/x/text/unicode/rangetable/rangetable.go
  139. +0 −6,378 vendor/golang.org/x/text/unicode/rangetable/tables10.0.0.go
  140. +0 −5,737 vendor/golang.org/x/text/unicode/rangetable/tables9.0.0.go

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
11 go.mod
@@ -0,0 +1,11 @@
module github.com/Raggaer/respoe

go 1.12

require (
github.com/PuerkitoBio/goquery v1.5.0
github.com/andybalholm/cascadia v1.0.0
github.com/raggaer/respoe v0.0.0-20190113202920-5d08796b127f
golang.org/x/net v0.0.0-20190110200230-915654e7eabc
golang.org/x/text v0.3.0
)
11 go.sum
@@ -0,0 +1,11 @@
github.com/PuerkitoBio/goquery v1.5.0 h1:uGvmFXOA73IKluu/F84Xd1tt/z07GYm8X49XKHP7EJk=
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/andybalholm/cascadia v1.0.0 h1:hOCXnnZ5A+3eVDX8pvgl4kofXv2ELss0bKcqRySc45o=
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/raggaer/respoe v0.0.0-20190113202920-5d08796b127f h1:wHpbY5TNgL/XgmGour7TsRBiOoZX7Rugm2TSvuZmEF4=
github.com/raggaer/respoe v0.0.0-20190113202920-5d08796b127f/go.mod h1:O4GK3N6YRkoL3xz5djPsNCWYYFV4NQqFB0InlkPVOXE=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190110200230-915654e7eabc h1:Yx9JGxI1SBhVLFjpAkWMaO1TF+xyqtHLjZpvQboJGiM=
golang.org/x/net v0.0.0-20190110200230-915654e7eabc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -3,6 +3,7 @@ package trade
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
@@ -40,6 +41,7 @@ type ExchangeEndpoints struct {

// ExchangeResponse struct used for exchange request responses
type ExchangeResponse struct {
Error string `json:"error"`
Result []string `json:"result"`
Id string `json:"id"`
Total int `json:"total"`
@@ -124,6 +126,11 @@ func RetrieveExchange(league string, have, want []string, online bool, c *client
return nil, err
}

// Check for errors
if exchangeResponse.Error != "" {
return nil, errors.New(exchangeResponse.Error)
}

// Retrieve deals response
offers, err := retrieveExchangeOffers(&exchangeResponse, c)
return offers, err

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 8de3d56

Please sign in to comment.
You can’t perform that action at this time.