-
Notifications
You must be signed in to change notification settings - Fork 35
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
Rarity query #210
Rarity query #210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a side note:
I have seen sometimes our blockchain logs print arrays with numbers that are hard to make any use of :D
looks like [123] [467] ...
- name: owner | ||
in: query | ||
required: false | ||
type: string | ||
- name: cardType | ||
- name: statuses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why plural? a card can only have 1 status right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but dont u query a list of cards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh yes, but you can only specify 1 status? So what you say is like "Give me all cards with status "permanent".
Example from real life:
You want to buy 4 apples, the apples are plural, then the nice lady in the marketplace asks you "Which sort of apples do you want?", then you yell "BOSKOP". The lady does not ask "Which sorts of apples do you want?"
@@ -14,27 +14,83 @@ var _ = strconv.Itoa(0) | |||
|
|||
func CmdQCards() *cobra.Command { | |||
cmd := &cobra.Command{ | |||
Use: "q-cards [owner] [status] [card-type] [classes] [sort-by] [name-contains] [keywords-contains] [notes-contains] [startercards-only] [balance-achors-only]", | |||
Use: "q-cards [owner] [statuses] [card-types] [classes] [rarities] [sort-by] [name-contains] [keywords-contains] [notes-contains] [startercards-only] [balance-achors-only]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question for card-type? A card can only have 1 type, so why is it plural?
default: | ||
states = []types.Status{types.Status(types.Status_value[req.Status.String()])} | ||
} | ||
fmt.Printf("---> Hier: %#v\n", req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug print important for production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huuch
if bool(cardobjClass.Culture) != strings.Contains(req.Classes, "Culture") { | ||
return false | ||
} | ||
fmt.Printf("%v, %v\n", cardobjClass, req.Classes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug print?
No description provided.