:calls: `GET /repos/:owner/:repo/subscription <http://developer.github.com/v3/activity/watching>`_
        :param watched: :class:`github.Repository.Repository`
        :rtype: bool
175743
def has_in_watched(self, watched):
        
        assert isinstance(watched, github.Repository.Repository), watched
        status, headers, data = self._requester.requestJson(
            "GET",
            "/repos/" + watched._identity + "/subscription"
        )
        return status == 200
1097999
def subscribe(self, observer):
        
        sid = self._sn
        self.observers[sid] = observer
        self._sn += 1
        return SubscribeID(self, sid)
69541
private boolean resubscribe() throws TransactionIdTooOldException,
      InterruptedException {
    for (NamespaceEventKey eventKey : watchedEvents.keySet()) {
      NamespaceEvent event = eventKey.getEvent(); 
      if (!subscribe(event.getPath(), EventType.fromByteValue(event.getType()),
          watchedEvents.get(eventKey))) {
        return false;
      }
    }
    return true;
  }
145590
public function watch($owner, $repo)
	{
		// Build the request path.
		$path = '/user/subscriptions/' . $owner . '/' . $repo;

		return $this->processResponse(
			$this->client->put($this->fetchUrl($path), ''),
			204
		);
	}
1037630
def unwatch(self_,watcher):
        
        try:
            self_._watch('remove',watcher)
        except:
            self_.warning('No such watcher {watcher} to remove.'.format(watcher=watcher))
1198480
def watch_project(self, path):
    
    # TODO(kwlzn): Add a client.query(timeout=X) param to the upstream pywatchman project.
    try:
      return self.client.query('watch-project', os.path.realpath(path))
    finally:
      self._attempt_set_timeout(self._timeout)
1289381
def run_watcher(self):
        
        # Create observer
        observer = Observer()

        # Start observer
        observer.start()

        # Dict that maps file path to `watch object`
        watche_obj_map = {}

        # Run change check in a loop
        while not self._watcher_to_stop:
            # Get current watch paths
            old_watch_path_s = set(watche_obj_map)

            # Get new watch paths
            new_watch_path_s = self._find_watch_paths()

            # For each new watch path
            for new_watch_path in new_watch_path_s:
                # Remove from the old watch paths if exists
                old_watch_path_s.discard(new_watch_path)

                # If the new watch path was not watched
                if new_watch_path not in watche_obj_map:
                    try:
                        # Schedule a watch
                        watch_obj = observer.schedule(
                            # 2KGRW
                            # `FileSystemEventHandler` instance
                            self,
                            # File path to watch
                            new_watch_path,
                            # Whether recursive
                            recursive=True,
                        )

                        # Store the watch obj
                        watche_obj_map[new_watch_path] = watch_obj

                    # If have error
                    except OSError:
                        # Set the watch object be None
                        watche_obj_map[new_watch_path] = None

            # For each old watch path that is not in the new watch paths
            for old_watch_path in old_watch_path_s:
                # Get watch object
                watch_obj = watche_obj_map.pop(old_watch_path, None)

                # If have watch object
                if watch_obj is not None:
                    # Unschedule the watch
                    observer.unschedule(watch_obj)

            # Store new watch paths
            self._watch_paths = new_watch_path_s

            # Sleep before next check
            time.sleep(self._interval)
1359666
def start_watching(self):
        
        if not self.is_sync:
            return

        self._stop = False
        while not self._stop:
            self.reactor.doIteration(0)
715632
def _re_establish_use_watch(self):
        
        if self.current_tube != self.desired_tube:
            self.use(self.desired_tube)
        if self._watchlist != self.desired_watchlist:
            self.watchlist = self.desired_watchlist
942867
def watch(ctx):
    
    watcher = Watcher(ctx)
    watcher.watch_directory(
        path='{pkg.source_less}', ext='.less',
        action=lambda e: build(ctx, less=True)
    )
    watcher.watch_directory(
        path='{pkg.source_js}', ext='.jsx',
        action=lambda e: build(ctx, js=True)
    )
    watcher.watch_directory(
        path='{pkg.docs}', ext='.rst',
        action=lambda e: build(ctx, docs=True)
    )
    watcher.start()
445287
def register_click_watcher(self, watcher_name, selectors, *condition_list):
        
        watcher = self.device.watcher(watcher_name)
        for condition in condition_list:
            watcher.when(**self.__unicode_to_dict(condition))
        watcher.click(**self.__unicode_to_dict(selectors))
        self.device.watchers.run()
699890
def add_watcher(self, issue, watcher):
        
        url = self._get_url('issue/' + str(issue) + '/watchers')
        self._session.post(
            url, data=json.dumps(watcher))
1146423
def fetch_watch_info(self):
        
        self._watch_info = self.send_and_read(WatchVersion(data=WatchVersionRequest()), WatchVersion).data
983171
def get_watchers(self):
        
        return github.PaginatedList.PaginatedList(
            github.NamedUser.NamedUser,
            self._requester,
            self.url + "/watchers",
            None
        )
3257
async def _unwatch(self, conn):
        ""
        await conn.send_command('UNWATCH')
        res = await conn.read_response()
        return self.watching and res or True
736044
def watch(
        self,
        username,
        watch={
            "friend":True,
            "deviations":True,
            "journals":True,
            "forum_threads":True,
            "critiques":True,
            "scraps":True,
            "activity":True,
            "collections":True
        }
    ):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/user/friends/watch/{}'.format(username), post_data={
            "watch[friend]": watch['friend'],
            "watch[deviations]": watch['deviations'],
            "watch[journals]": watch['journals'],
            "watch[forum_threads]": watch['forum_threads'],
            "watch[critiques]": watch['critiques'],
            "watch[scraps]": watch['scraps'],
            "watch[activity]": watch['activity'],
            "watch[collections]": watch['collections'],
        })

        return response['success']
193244
def get(self, path, watch=None):
        
        return self._zk.get(self.__path(path), watch=watch)