// GetMessages returns a list of messages in a room.
// Pagination is optional. You can pass nil or specific pagination params.
5213
func (gitter *Gitter) GetMessages(roomID string, params *Pagination) ([]Message, error) {

	var messages []Message
	url := gitter.config.apiBaseURL + "rooms/" + roomID + "/chatMessages"
	if params != nil {
		url += "?" + params.encode()
	}
	response, err := gitter.get(url)
	if err != nil {
		gitter.log(err)
		return nil, err
	}

	err = json.Unmarshal(response, &messages)
	if err != nil {
		gitter.log(err)
		return nil, err
	}

	return messages, nil
}
917776
func (v *Xception) GetMessage() (o string) {
	if v != nil && v.Message != nil {
		return *v.Message
	}

	return
}
895070
func getMessage(details []string) message.Fields {
	m := message.Fields{}

	if len(details) > 0 {
		m["operation"] = strings.Join(details, " ")
	}

	return m
}
1224183
func (n *NotifyRouter) GetChannels(i ConnectionID) keybase1.NotificationChannels {
	return n.getNotificationChannels(i)
}
1109673
func (buf *LogBuffer) PrintMessages(w io.Writer, max_num int) (err error) {
	if max_num <= 0 {
		return
	}
	msgStart := buf.messages
	if max_num < buf.message_buffer {
		msgStart = msgStart.Move(-max_num)
	}
	msgStart.Do(func(msg interface{}) {
		if msg != nil && err == nil {
			_, err = fmt.Fprint(w, msg)
		}
	})
	return
}
1056548
func (p *PullRequestMergeResult) GetMessage() string {
	if p == nil || p.Message == nil {
		return ""
	}
	return *p.Message
}
1340688
func (api *Client) GetConversations(params *GetConversationsParameters) (channels []Channel, nextCursor string, err error) {
	return api.GetConversationsContext(context.Background(), params)
}
312956
func (s *linkSession) gotMessage(msg *linkMessage, replychnl chan *linkMessage) {
  switch msg.Frame.Method() {
  case ALIVE_PING:
    // TODO: record ping?
    break
  case CLIENT_TUN_NEW:
    b, err := msg.Frame.GetParamStr(K_CIDR)
    if err == nil {
      _, cidr, err := net.ParseCIDR(string(b))
      if err == nil {
        if s.acceptTunnel(cidr) {
          // tunnel allowed
          t := &linkTunnel{
            tid: s.nextTunnelID(),
            allowed: cidr,
          }
          // add tunnel
          s.addTunnel(t)
          // reply
          replychnl <- &linkMessage{
            Addr: s.remote,
            Frame: newCreateClientTunnelReply(t.allowed, t.tid),
          }
        } else {
          // rejected
          replychnl <- &linkMessage{
            Addr: s.remote,
            Frame: newCreateClientTunnelReply(cidr, 0),
          }
        }
        return
      }
    }
    // error
    // TODO: reply?
    log.Println("error handling CLIENT_TUN_NEW", err)
    break
  case CLIENT_TUN_DEL:
     
  }
  
}
806591
func (sc *StatementContext) GetMessage() string {
	sc.mu.Lock()
	msg := sc.mu.message
	sc.mu.Unlock()
	return msg
}
1307174
func (api *Client) GetConversationReplies(params *GetConversationRepliesParameters) (msgs []Message, hasMore bool, nextCursor string, err error) {
	return api.GetConversationRepliesContext(context.Background(), params)
}
1225378
func (api *Client) GetMessage(id string) (*Message, error) {
	result, _, err := api.makeRequest(http.MethodGet, fmt.Sprintf("%s/%s", api.concatUserPath(messagesPath), id), &Message{})
	if err != nil {
		return nil, err
	}
	return result.(*Message), nil
}
379151
func GetAll(err error, msg string) []error {
	var result []error

	Walk(err, func(err error) {
		if err.Error() == msg {
			result = append(result, err)
		}
	})

	return result
}
499991
func GetMessage(err interface{}) string {
	switch e := err.(type) {
	case DropboxError:
		return extractFullErrorMessage(e, false)
	case runtime.Error:
		return runtime.Error(e).Error()
	case error:
		return e.Error()
	default:
		return "Passed a non-error to GetMessage"
	}
}
551551
func GetMessage(err error) string {
	if err == nil {
		return ""
	}
	cast, ok := err.(*Error)
	if !ok {
		return err.Error()
	}
	return cast.Message()
}
455621
func readMessages(r io.Reader, p []byte) error {
	for len(p) > 0 {
		n, err := r.Read(p)
		p = p[n:]
		if err != nil {
			return err
		}
	}
	return nil
}
555760
func GetMsg(db *sqlx.DB, id uint64) (*Msg, error) {
	q := `SELECT id, sentence, abotsent
	      FROM messages
	      WHERE id=$1`
	m := &Msg{}
	if err := db.Get(m, q, id); err != nil {
		return nil, err
	}
	return m, nil
}
430942
func (m *Descriptor) GetMessage(name string) *Descriptor {
	for _, msg := range m.GetMessages() {
		// can lookup by name or message prefixed name (qualified)
		if msg.GetName() == name || msg.GetLongName() == name {
			return msg
		}
	}

	return nil
}