diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c28c40c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.vscode/launch.json +debug \ No newline at end of file diff --git a/item.go b/item.go index b03e287..dc7a7ed 100644 --- a/item.go +++ b/item.go @@ -8,7 +8,6 @@ import ( "net/http" "net/url" "regexp" - "strings" ) // Item struct containing data on retrieved items @@ -182,7 +181,7 @@ func (s *Session) GetModels(user string) ([]Item, error) { itm := obj.(map[string]interface{}) iInfo := itm["Item"].(map[string]interface{}) iCreator := itm["Creator"].(map[string]interface{}) - Data = append(Data, Item{"", strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.2f", iInfo["AssetId"].(float64)), "0"), "."), "", strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.2f", iCreator["Id"].(float64)), "0"), "."), iCreator["Name"].(string), "Model", iInfo["Name"].(string), false, true}) + Data = append(Data, Item{"", string(int(iInfo["AssetId"].(float64))), "", string(int(iCreator["Id"].(float64))), iCreator["Name"].(string), "Model", iInfo["Name"].(string), false, true}) } return Data, nil diff --git a/message.go b/message.go index fdb501f..5b0b9ad 100644 --- a/message.go +++ b/message.go @@ -98,7 +98,7 @@ func (s *Session) SendMessage(subject string, body string, recipientid int) erro return nil } -// ArchiveMessages will archieve a list of messages +// ArchiveMessages will archive a list of messages func (s *Session) ArchiveMessages(ids []string) error { payload := map[string][]string{ "messageIds": ids,