Add the points to a contact

        :param obj_id: int
        :param points: int
        :param kwargs: dict 'eventname' and 'actionname'
        :return: dict|str
174798
def add_points(self, obj_id, points, **kwargs):
        

        response = self._client.session.post(
            '{url}/{id}/points/plus/{points}'.format(
                url=self.endpoint_url, id=obj_id, points=points
            ),
            data=kwargs
        )
        return self.process_response(response)
1277159
def send_to_contact(self, obj_id, contact_id):
        
        response = self._client.session.post(
            '{url}/{id}/send/contact/{contact_id}'.format(
                url=self.endpoint_url, id=obj_id, contact_id=contact_id
            )
        )
        return self.process_response(response)
464396
def append(self, acces, **kwargs):
        
        if acces.Id in set(ac.Id for ac in self):
            raise ValueError("Acces id already in list !")
        list.append(self, acces)
        if kwargs:
            self.infos[acces.Id] = kwargs
612331
def get(self, metric_id=None, **kwargs):
        
        if metric_id is None:
            raise AttributeError('metric_id is required to get metric points.')

        return self._get('metrics/%s/points' % metric_id, data=kwargs)
725009
def propagate_ids(cls, obj, match_id, new_id, applied_keys, backend=None):
        
        applied = []
        def propagate(o):
            if o.id == match_id or (o.__class__.__name__ == 'DynamicMap'):
                setattr(o, 'id', new_id)
                applied.append(o)
        obj.traverse(propagate, specs=set(applied_keys) | {'DynamicMap'})

        # Clean up the custom tree if it was not applied
        if not new_id in Store.custom_options(backend=backend):
            raise AssertionError("New option id %d does not match any "
                                 "option trees in Store.custom_options."
                                 % new_id)
        return applied
1080722
def _drawPoints(self, pen, **kwargs):
        
        # The try: ... except TypeError: ...
        # handles backwards compatibility with
        # point pens that have not been upgraded
        # to point pen protocol 2.
        try:
            pen.addComponent(self.baseGlyph, self.transformation,
                             identifier=self.identifier, **kwargs)
        except TypeError:
            pen.addComponent(self.baseGlyph, self.transformation, **kwargs)
528637
def put(self, event_type, event_data={}, **kwargs):
        
        event = dict(type=event_type, data=event_data)

        event["time"] = kwargs.get("time", datetime.utcnow().isoformat())

        if kwargs.get("id"):
            event["id"] = kwargs.get("id")

        data = json.dumps([event])

        r = requests.post(self.collector_url + 'event/put',
                          data=data,
                          headers={'content-type': 'application/json'})
        r.raise_for_status()

        return [event]
1267596
def add_object(self, name, obj):
        
        if iskeyword(name):
            name = '_' + name
        setattr(self, name, APIObject(self, **obj))
        self._objects[name] = getattr(self, name)
794604
def add(self, obj):
        
        activity = {
            "verb": "add",
            "object": {
                "objectType": obj.object_type,
                "id": obj.id
            },
            "target": {
                "objectType": self.object_type,
                "id": self.id
            }
        }

        self._post_activity(activity)

        # Remove the cash so it's re-generated next time it's needed
        self._members = None
706769
def add_set_of_points(self, points):
        
        self.set_of_points = np.concatenate((self.set_of_points, points))
628985
def edit(self, obj_id, parameters, create_if_not_exists=False):
        
        if create_if_not_exists:
            response = self._client.session.put(
                '{url}/{id}/edit'.format(
                    url=self.endpoint_url, id=obj_id
                ),
                data=parameters
            )
        else:
            response = self._client.session.patch(
                '{url}/{id}/edit'.format(
                    url=self.endpoint_url, id=obj_id
                ),
                data=parameters
            )
        return self.process_response(response)
406293
def add(self, obj):
        
        obj.controller = self.controller
        # Is the track already loaded or created?
        track = self.tracks.get(obj.name)
        if track:
            if track == obj:
                return
            # hijack the track data
            obj.keys = track.keys
            obj.controller = track.controller
            self.tracks[track.name] = obj
            self.track_index[self.track_index.index(track)] = obj
        else:
            # Add a new track
            obj.controller = self.controller
            self.tracks[obj.name] = obj
            self.track_index.append(obj)
1022635
def points(self, points):
        
        if not isinstance(points, np.ndarray):
            raise TypeError('Points must be a numpy array')
        vtk_points = vtki.vtk_points(points, False)
        self.SetPoints(vtk_points)
        self.GetPoints().Modified()
        self.Modified()
150676
function makePoint() {
      // Pull start time from req and log responseTime
      var responseTime = Date.now() - req.start;
      
      // Add the new point to the batch of points
      batch.points.push({
        measurement: "requests",
        "tags": {
          "path": req.path,
          "host": req.hostname,
          "verb": req.method,
          "status": res.statusCode,
        },
        "fields": {
          "responseTime": responseTime,
        },
      })
      
      // Emit the 'addPoint' event
      batch.emit("addPoint")
    }
580148
def _iterPoints(self, **kwargs):
        
        points = self.points
        count = len(points)
        index = 0
        while count:
            yield points[index]
            count -= 1
            index += 1
75126
def add_application(self, application_id, **kwargs):
        
        path = 'group/%s/application' % self.id

        data = {'application_id': application_id}
        if kwargs:
            data["options"] = kwargs

        self.api.request(path, data)
306384
def _appendBPoint(self, type, anchor, bcpIn=None, bcpOut=None, **kwargs):
        
        self.insertBPoint(
            len(self.bPoints),
            type,
            anchor,
            bcpIn=bcpIn,
            bcpOut=bcpOut
        )