// Read fetches a single Conversation based on its ID.
187903
func Read(c *messagebird.Client, id string) (*Conversation, error) {
	conv := &Conversation{}
	if err := request(c, conv, http.MethodGet, path+"/"+id, nil); err != nil {
		return nil, err
	}

	return conv, nil
}
592078
func (r *multiReaderSeeker) Read(buf []byte) (int, error) {
	if r.index >= len(r.readers) {
		return 0, io.EOF
	}
	n, err := r.readers[r.index].Read(buf)
	if err == io.EOF {
		r.index++
		err = nil
	}
	return n, err
}
569559
func (part *Partition) Read(id int) ([]byte, error) {
	physID := part.lookup.Get(id, 1)

	if len(physID) == 0 {
		return nil, dberr.New(dberr.ErrorNoDoc, id)
	}

	data := part.col.Read(physID[0])

	if data == nil {
		return nil, dberr.New(dberr.ErrorNoDoc, id)
	}

	return data, nil
}
772442
func (r *AutoVLANOperResource) Read(id string) error {
	key := fmt.Sprintf(vLANResourceOperPath, id)
	return r.StateDriver.ReadState(key, r, json.Unmarshal)
}
1000783
func (r *Response) Read(p []byte) (n int, err error) {

	if r.Error != nil {
		return -1, r.Error
	}

	return r.RawResponse.Body.Read(p)
}
154269
func (col *Collection) Read(id int) []byte {
	if id < 0 || id > col.Used-DocHeader || col.Buf[id] != 1 {
		return nil
	} else if room, _ := binary.Varint(col.Buf[id+1 : id+11]); room > int64(col.DocMaxRoom) {
		return nil
	} else if docEnd := id + DocHeader + int(room); docEnd >= col.Size {
		return nil
	} else {
		docCopy := make([]byte, room)
		copy(docCopy, col.Buf[id+DocHeader:docEnd])
		return docCopy
	}
}
515170
func (client *socketClient) Read() (msg []byte, err error) {
	_, msg, err = client.conn.ReadMessage()
	return
}
164260
func (a *adapter) Read(app string, lines int) ([]string, error) {
	rb, ok := a.ringBuffers[app]
	if ok {
		return rb.read(lines), nil
	}
	return nil, fmt.Errorf("Could not find logs for '%s'", app)
}
652608
func (u readCloser) Read(p []byte) (n int, err error) {
	return u.reader.Read(p)
}
643184
func (r *translateFileReader) Read(p []byte) (n int, err error) {
	for {
		// Obtain notification channel before we check for new data.
		notify := r.store.WriteNotify()

		// Exit if we can read one or more valid entries or we receive an error.
		if n, err = r.read(p); n > 0 || err != nil {
			return n, err
		}

		// Wait for new data or close.
		select {
		case <-r.ctx.Done():
			return 0, r.ctx.Err()
		case <-r.closing:
			return 0, ErrTranslateStoreReaderClosed
		case <-r.store.Closing():
			return 0, ErrTranslateStoreClosed
		case <-notify:
			continue
		}
	}
}
187145
func (col *Col) Read(id int) (doc map[string]interface{}, err error) {
	return col.read(id, true)
}
478710
func (cs *UserService) Read(userID int) (*UsersResponse, error) {
	users, err := cs.List()
	if err != nil {
		return nil, err
	}

	for i := range users {
		if users[i].Id == userID {
			return &users[i], nil
		}
	}

	return nil, fmt.Errorf("UserId: " + strconv.Itoa(userID) + " not found")
}
1025324
func (r *AutoVXLANCfgResource) Read(id string) error {
	key := fmt.Sprintf(vXLANResourceConfigPath, id)
	return r.StateDriver.ReadState(key, r, json.Unmarshal)
}
42714
func (c *Connector) Read(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue, minimumFields []string) (map[string]dosa.FieldValue, error) {
	if c.Next == nil {
		return nil, NewErrNoMoreConnector()
	}
	return c.Next.Read(ctx, ei, values, minimumFields)
}
439806
func (c *Client) Read(name string) ([]byte, error) {
	f := c.Open(name)
	defer f.Close()
	return ioutil.ReadAll(f)
}
803226
func (b *Buffer) read() []*rfc5424.Message {
	if b.length == -1 {
		return nil
	}

	buf := make([]*rfc5424.Message, 0, b.length)
	msg := b.head
	for msg != nil {
		buf = append(buf, &msg.Message)
		msg = msg.next
	}
	return buf
}
233929
func (c *IdleTimingConn) Read(b []byte) (int, error) {
	c.closeMutex.RLock()
	n, err := c.doRead(b)
	c.closeMutex.RUnlock()
	return n, err
}