diff --git a/item.go b/item.go index dc7a7ed..4fc5505 100644 --- a/item.go +++ b/item.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" "regexp" + "strconv" ) // Item struct containing data on retrieved items @@ -181,7 +182,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{"", string(int(iInfo["AssetId"].(float64))), "", string(int(iCreator["Id"].(float64))), iCreator["Name"].(string), "Model", iInfo["Name"].(string), false, true}) + Data = append(Data, Item{"", strconv.Itoa(int(iInfo["AssetId"].(float64))), "", strconv.Itoa(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 cb15c63..ea2650d 100644 --- a/message.go +++ b/message.go @@ -48,10 +48,10 @@ func (s *Session) GetInbox() ([]Message, error) { sender := msg["Sender"].(map[string]interface{}) message := Message{} - message.ID = string(int(msg["Id"].(float64))) + message.ID = strconv.Itoa(int(msg["Id"].(float64))) message.Subject = msg["Subject"].(string) message.Body = msg["Body"].(string) - message.FromID = string(int(sender["UserId"].(float64))) + message.FromID = strconv.Itoa(int(sender["UserId"].(float64))) message.FromName = sender["UserName"].(string) messages = append(messages, message) }