Open an instance of the inbox page for the logged in user.
433612
def open_inbox_page(self, content_type):
        
        from .inbox_page import InboxPage

        with self.term.loader('Loading inbox'):
            page = InboxPage(self.reddit, self.term, self.config, self.oauth,
                             content_type=content_type)
        if not self.term.loader.exception:
            return page
978635
def get_inbox(self, *args, **kwargs):
        
        return self.get_content(self.config['inbox'], *args, **kwargs)
834885
def open_raw(self, page, parms=None, payload=None, HTTPrequest=None, payload_type='application/json' ):
        ''''''
        if not parms:
            parms={}

        # if we're using a key, but it's not going in the header, add it to the parms array
        if self._key and not self.key_in_header:
            parms['key'] = self._key

        # encode any data
        urldata = ''
        if parms:
            urldata = '?' + urllib.urlencode( parms )


        fullUrl = self._url + page

        #debug
        if self.debug:
            print fullUrl + urldata

        # register this url to be used with the opener
        # must be registered for each unique path
        try:
            self._opener.open( fullUrl )
        except AttributeError:
            # No authentication
            pass

        # Set up the request
        if HTTPrequest:
            request = HTTPrequest( fullUrl + urldata )
        else:
            request = urllib2.Request( fullUrl + urldata )

        # If the key is set and in the header, add it
        if self._key and self.key_in_header:
            request.add_header('X-Redmine-API-Key', self._key)

        # If impersonation is set, add header
        if self.impersonate and self.impersonation_supported:
            request.add_header('X-Redmine-Switch-User', self.impersonate)

        # get the data and return XML object
        if payload:
            request.add_header('Content-Type', payload_type)
            response = urllib2.urlopen( request, payload )
        else:
            response = urllib2.urlopen( request )

        return response
470484
function InboxPage(controller, vox, view) {
  this.controller = controller;
  this.vox = vox;
  this.view = view;
  this.visible = false;
  this._unreadCounts = {};
  this._readStream = this.vox.createReadStream({
        type: 'MESSAGE',
        startSeq: 1,
        checkpointKey: SYNC_CHECKPOINT
    })
    .on('data', this._incrementUnreadCount.bind(this))
    .on('error', this._onReadStreamError.bind(this));
}
769702
def opened(self):
        
        def post_setup((cmds, resps)):
            """Post setup callback."""
            logger.info("Setup complete, listening...")

        self.send_cmds(('connect', CONN_SPEC),
                       ('watchMailboxes', {'account': ACCOUNT,
                                           'list': ['INBOX']}),
                       ('watchAll', {})).then(post_setup)
1242674
def process_email(ctx, param, value):
    """"""
    user = User.query.filter(User.email == value).first()
    if not user:
        raise click.BadParameter('User with email \'%s\' not found.', value)
    return user
383628
public static function openBy($I, $params = [])
    {
        $page = new static($I);
        $I->amOnPage($page->getUrl($params));

        return $page;
    }
478857
def open(self):
        """"""
        open_command = StandardSend(self._address,
                                    COMMAND_LIGHT_ON_0X11_NONE, cmd2=0xff)
        self._send_method(open_command, self._open_message_received)
36658
def notify(cls, user_or_email, instance):
        """"""
        return super(InstanceEvent, cls).notify(user_or_email,
                                                object_id=instance.pk)
880497
async def open_interface_message(self, message, context):
        

        conn_string = message.get('connection_string')
        interface = message.get('interface')
        client_id = context.user_data

        await self.open_interface(client_id, conn_string, interface)
1026814
def open_subscription_page(self, content_type):
        
        from .subscription_page import SubscriptionPage

        with self.term.loader('Loading {0}s'.format(content_type)):
            page = SubscriptionPage(self.reddit, self.term, self.config,
                                    self.oauth, content_type=content_type)
        if not self.term.loader.exception:
            return page
151049
def create_welcome_client(self):
        """"""
        if self.tabwidget.count() == 0:
            welcome = open(WELCOME).read()
            client = NotebookClient(self, WELCOME, ini_message=welcome)
            self.add_tab(client)
            return client
97447
def __open(self, url, headers=None, data=None, baseurl=""):
        """"""
        headers = headers or {}
        if not baseurl:
            baseurl = self.baseurl
        req = Request("%s%s" % (baseurl, url), headers=headers)
        _LOGGER.debug(url)

        try:
            req.data = urlencode(data).encode('utf-8')
        except TypeError:
            pass
        opener = build_opener()

        try:
            resp = opener.open(req)
            charset = resp.info().get('charset', 'utf-8')
            data = json.loads(resp.read().decode(charset))
            opener.close()
            _LOGGER.debug(json.dumps(data))
            return data
        except HTTPError as exception_:
            if exception_.code == 408:
                _LOGGER.debug("%s", exception_)
                return False
            raise TeslaException(exception_.code)
871298
def given_i_am_logged_in(context, username):
    
    user = get_user_model().objects.get(username=username)
    context.apiClient.force_authenticate(user=user)
1190788
def onInbox(self, unseen=None, unread=None, recent_unread=None, msg=None):
        
        log.info("Inbox event: {}, {}, {}".format(unseen, unread, recent_unread))
1329003
def _maybe_init_user(self):
    """"""
    user_name = os.environ.get('USER', '') or os.environ.get('USERNAME', '')
    cursor = self._db.cursor()
    cursor.execute('SELECT user_id FROM Users WHERE user_name = ?',
                   (user_name,))
    row = cursor.fetchone()
    if row:
      return row[0]
    user_id = self._create_id()
    cursor.execute(
        """
        INSERT INTO USERS (user_id, user_name, inserted_time)
        VALUES (?, ?, ?)
        """,
        (user_id, user_name, time.time()))
    return user_id
1187079
def read_welcome_message(self):
        '''
        '''
        reply = yield from self._control_stream.read_reply()

        self.raise_if_not_match(
            'Server ready', ReplyCodes.service_ready_for_new_user, reply)