_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
75
19.8k
language
stringclasses
1 value
meta_information
dict
q18800
PyMata3.i2c_config
train
def i2c_config(self, read_delay_time=0): """ This method configures Arduino i2c with an optional read delay time. :param read_delay_time: firmata i2c delay time :returns: No return value """ task = asyncio.ensure_future(self.core.i2c_config(read_delay_time)) sel...
python
{ "resource": "" }
q18801
PyMata3.i2c_read_data
train
def i2c_read_data(self, address): """ Retrieve result of last data read from i2c device. i2c_read_request should be called before trying to retrieve data. It is intended for use by a polling application. :param address: i2c :returns: last data read or None if no data is...
python
{ "resource": "" }
q18802
PyMata3.send_reset
train
def send_reset(self): """ Send a Firmata reset command :returns: No return value """ task = asyncio.ensure_future(self.core.send_reset()) self.loop.run_until_complete(task)
python
{ "resource": "" }
q18803
PyMata3.servo_config
train
def servo_config(self, pin, min_pulse=544, max_pulse=2400): """ This method configures the Arduino for servo operation. :param pin: Servo control pin :param min_pulse: Minimum pulse width :param max_pulse: Maximum pulse width :returns: No return value """ ...
python
{ "resource": "" }
q18804
PyMata3.set_analog_latch
train
def set_analog_latch(self, pin, threshold_type, threshold_value, cb=None, cb_type=None): """ This method "arms" an analog pin for its data to be latched and saved in the latching table. If a callback method is provided, when latching criteria is achieved, ...
python
{ "resource": "" }
q18805
PyMata3.set_pin_mode
train
def set_pin_mode(self, pin_number, pin_state, callback=None, cb_type=None): """ This method sets the pin mode for the specified pin. :param pin_number: Arduino Pin Number :param pin_state: INPUT/OUTPUT/ANALOG/PWM/PULLUP - for SERVO use servo_config() ...
python
{ "resource": "" }
q18806
PyMata3.set_sampling_interval
train
def set_sampling_interval(self, interval): """ This method sets the sampling interval for the Firmata loop method :param interval: time in milliseconds :returns: No return value """ task = asyncio.ensure_future(self.core.set_sampling_interval(interval)) self.loo...
python
{ "resource": "" }
q18807
PyMata3.shutdown
train
def shutdown(self): """ Shutdown the application and exit :returns: No return value """ task = asyncio.ensure_future(self.core.shutdown()) self.loop.run_until_complete(task)
python
{ "resource": "" }
q18808
PyMata3.pixy_init
train
def pixy_init(self, max_blocks=5, cb=None, cb_type=None): """ Initialize Pixy and will enable Pixy block reporting. This is a FirmataPlusRB feature. :param cb: callback function to report Pixy blocks :param cb_type: Constants.CB_TYPE_DIRECT = direct call or ...
python
{ "resource": "" }
q18809
PymataSerial.write
train
async def write(self, data): """ This is an asyncio adapted version of pyserial write. It provides a non-blocking write and returns the number of bytes written upon completion :param data: Data to be written :return: Number of bytes written """ # the sec...
python
{ "resource": "" }
q18810
PymataSerial.readline
train
async def readline(self): """ This is an asyncio adapted version of pyserial read. It provides a non-blocking read and returns a line of data read. :return: A line of data """ future = asyncio.Future() data_available = False while True: if not...
python
{ "resource": "" }
q18811
MMA8452Q3.check_who_am_i
train
def check_who_am_i(self): """ This method checks verifies the device ID. @return: True if valid, False if not """ register = self.MMA8452Q_Register['WHO_AM_I'] self.board.i2c_read_request(self.address, register, 1, Constants.I2C_READ |...
python
{ "resource": "" }
q18812
MMA8452Q3.standby
train
def standby(self): """ Put the device into standby mode so that the registers can be set. @return: No return value """ register = self.MMA8452Q_Register['CTRL_REG1'] self.board.i2c_read_request(self.address, register, 1, Constants.I2C_R...
python
{ "resource": "" }
q18813
MMA8452Q3.set_scale
train
def set_scale(self, scale): """ Set the device scale register. Device must be in standby before calling this function @param scale: scale factor @return: No return value """ register = self.MMA8452Q_Register['XYZ_DATA_CFG'] self.board.i2c_read_request(self...
python
{ "resource": "" }
q18814
MMA8452Q3.set_output_data_rate
train
def set_output_data_rate(self, output_data_rate): """ Set the device output data rate. Device must be in standby before calling this function @param output_data_rate: Desired data rate @return: No return value. """ # self.standby() register = self.MMA8452Q...
python
{ "resource": "" }
q18815
MMA8452Q3.available
train
def available(self): """ This method checks to see if new xyz data is available @return: Returns 0 if not available. 1 if it is available """ register = self.MMA8452Q_Register['STATUS'] self.board.i2c_read_request(self.address, register, 1, ...
python
{ "resource": "" }
q18816
blink
train
async def blink(my_board): """ Blink LED 13 @return: No Return Value """ # set the pin mode await my_board.set_pin_mode(13, Constants.OUTPUT) for i in range(0, 5): await my_board.digital_write(13, 1) await asyncio.sleep(1) await my_board.digital_write(13, 0) ...
python
{ "resource": "" }
q18817
turn_right
train
def turn_right(): """turns RedBot to the Right""" motors.left_motor(-150) # spin CCW motors.right_motor(-150) # spin CCW board.sleep(0.5) motors.brake(); board.sleep(0.1)
python
{ "resource": "" }
q18818
turn_left
train
def turn_left(): """turns RedBot to the Left""" motors.left_motor(150) # spin CCW motors.right_motor(150) # spin CCW board.sleep(0.5) motors.brake(); board.sleep(0.1)
python
{ "resource": "" }
q18819
PymataCore.analog_write
train
async def analog_write(self, pin, value): """ Set the selected pin to the specified value. :param pin: PWM pin number :param value: Pin value (0 - 0x4000) :returns: No return value """ if PrivateConstants.ANALOG_MESSAGE + pin < 0xf0: command = [Priv...
python
{ "resource": "" }
q18820
PymataCore.digital_pin_write
train
async def digital_pin_write(self, pin, value): """ Set the specified pin to the specified value directly without port manipulation. :param pin: pin number :param value: pin value :returns: No return value """ command = (PrivateConstants.SET_DIGITAL_PIN_VALUE, ...
python
{ "resource": "" }
q18821
PymataCore.digital_write
train
async def digital_write(self, pin, value): """ Set the specified pin to the specified value. :param pin: pin number :param value: pin value :returns: No return value """ # The command value is not a fixed value, but needs to be calculated # using the pi...
python
{ "resource": "" }
q18822
PymataCore.disable_analog_reporting
train
async def disable_analog_reporting(self, pin): """ Disables analog reporting for a single analog pin. :param pin: Analog pin number. For example for A0, the number is 0. :returns: No return value """ command = [PrivateConstants.REPORT_ANALOG + pin, Pr...
python
{ "resource": "" }
q18823
PymataCore.disable_digital_reporting
train
async def disable_digital_reporting(self, pin): """ Disables digital reporting. By turning reporting off for this pin, Reporting is disabled for all 8 bits in the "port" :param pin: Pin and all pins for this port :returns: No return value """ port = pin // 8 ...
python
{ "resource": "" }
q18824
PymataCore.encoder_config
train
async def encoder_config(self, pin_a, pin_b, cb=None, cb_type=None, hall_encoder=False): """ This command enables the rotary encoder support and will enable encoder reporting. This command is not part of StandardFirmata. For 2 pin + ground encoders, ...
python
{ "resource": "" }
q18825
PymataCore.enable_analog_reporting
train
async def enable_analog_reporting(self, pin): """ Enables analog reporting. By turning reporting on for a single pin, :param pin: Analog pin number. For example for A0, the number is 0. :returns: No return value """ command = [PrivateConstants.REPORT_ANALOG + pin, ...
python
{ "resource": "" }
q18826
PymataCore.enable_digital_reporting
train
async def enable_digital_reporting(self, pin): """ Enables digital reporting. By turning reporting on for all 8 bits in the "port" - this is part of Firmata's protocol specification. :param pin: Pin and all pins for this port :returns: No return value """ po...
python
{ "resource": "" }
q18827
PymataCore.extended_analog
train
async def extended_analog(self, pin, data): """ This method will send an extended-data analog write command to the selected pin. :param pin: 0 - 127 :param data: 0 - 0xfffff :returns: No return value """ analog_data = [pin, data & 0x7f, (data >> 7) & 0x...
python
{ "resource": "" }
q18828
PymataCore.get_analog_map
train
async def get_analog_map(self): """ This method requests a Firmata analog map query and returns the results. :returns: An analog map response or None if a timeout occurs """ # get the current time to make sure a report is retrieved current_time = time.time() # i...
python
{ "resource": "" }
q18829
PymataCore.get_capability_report
train
async def get_capability_report(self): """ This method requests and returns a Firmata capability query report :returns: A capability report in the form of a list """ if self.query_reply_data.get( PrivateConstants.CAPABILITY_RESPONSE) is None: await se...
python
{ "resource": "" }
q18830
PymataCore.get_protocol_version
train
async def get_protocol_version(self): """ This method returns the major and minor values for the protocol version, i.e. 2.4 :returns: Firmata protocol version """ if self.query_reply_data.get(PrivateConstants.REPORT_VERSION) == '': await self._send_command([P...
python
{ "resource": "" }
q18831
PymataCore.i2c_read_data
train
async def i2c_read_data(self, address): """ This method retrieves cached i2c data to support a polling mode. :param address: I2C device address :returns: Last cached value read """ if address in self.i2c_map: map_entry = self.i2c_map.get(address) ...
python
{ "resource": "" }
q18832
PymataCore.set_analog_latch
train
async def set_analog_latch(self, pin, threshold_type, threshold_value, cb=None, cb_type=None): """ This method "arms" an analog pin for its data to be latched and saved in the latching table If a callback method is provided, when latching criteria is achiev...
python
{ "resource": "" }
q18833
PymataCore.set_digital_latch
train
async def set_digital_latch(self, pin, threshold_value, cb=None, cb_type=None): """ This method "arms" a digital pin for its data to be latched and saved in the latching table If a callback method is provided, when latching criteria is achieved, th...
python
{ "resource": "" }
q18834
PymataCore.shutdown
train
async def shutdown(self): """ This method attempts an orderly shutdown If any exceptions are thrown, just ignore them. :returns: No return value """ if self.log_output: logging.info('Shutting down ...') else: print('Shutting down ...') ...
python
{ "resource": "" }
q18835
PymataCore.sleep
train
async def sleep(self, sleep_time): """ This method is a proxy method for asyncio.sleep :param sleep_time: Sleep interval in seconds :returns: No return value. """ try: await asyncio.sleep(sleep_time) except RuntimeError: if self.log_outpu...
python
{ "resource": "" }
q18836
PymataCore.pixy_init
train
async def pixy_init(self, max_blocks=5, cb=None, cb_type=None): """ Initialize Pixy and enable Pixy block reporting. This is a FirmataPlusRB feature. :param cb: callback function to report Pixy blocks :param cb_type: Constants.CB_TYPE_DIRECT = direct call or ...
python
{ "resource": "" }
q18837
PymataCore._command_dispatcher
train
async def _command_dispatcher(self): """ This is a private method. It continually accepts and interprets data coming from Firmata,and then dispatches the correct handler to process the data. :returns: This method never returns """ # sysex commands are assembled i...
python
{ "resource": "" }
q18838
PymataCore._analog_message
train
async def _analog_message(self, data): """ This is a private message handler method. It is a message handler for analog messages. :param data: message data :returns: None - but saves the data in the pins structure """ pin = data[0] value = (data[PrivateC...
python
{ "resource": "" }
q18839
PymataCore._digital_message
train
async def _digital_message(self, data): """ This is a private message handler method. It is a message handler for Digital Messages. :param data: digital message :returns: None - but update is saved in pins structure """ port = data[0] port_data = (data[P...
python
{ "resource": "" }
q18840
PymataCore._encoder_data
train
async def _encoder_data(self, data): """ This is a private message handler method. It handles encoder data messages. :param data: encoder data :returns: None - but update is saved in the digital pins structure """ # strip off sysex start and end data = d...
python
{ "resource": "" }
q18841
PymataCore._pixy_data
train
async def _pixy_data(self, data): """ This is a private message handler method. It handles pixy data messages. :param data: pixy data :returns: None - but update is saved in the digital pins structure """ if len(self.digital_pins) < PrivateConstants.PIN_PIXY_MOS...
python
{ "resource": "" }
q18842
PymataCore._sonar_data
train
async def _sonar_data(self, data): """ This method handles the incoming sonar data message and stores the data in the response table. :param data: Message data from Firmata :returns: No return value. """ # strip off sysex start and end data = data[1:-1]...
python
{ "resource": "" }
q18843
PymataCore._check_latch_data
train
async def _check_latch_data(self, key, data): """ This is a private utility method. When a data change message is received this method checks to see if latching needs to be processed :param key: encoded pin number :param data: data change :returns: None ...
python
{ "resource": "" }
q18844
PymataCore._discover_port
train
def _discover_port(self): """ This is a private utility method. This method attempts to discover the com port that the arduino is connected to. :returns: Detected Comport """ # if MAC get list of ports if sys.platform.startswith('darwin'): loc...
python
{ "resource": "" }
q18845
PymataCore._format_capability_report
train
def _format_capability_report(self, data): """ This is a private utility method. This method formats a capability report if the user wishes to send it to the console. If log_output = True, no output is generated :param data: Capability report :returns: None ...
python
{ "resource": "" }
q18846
PymataCore._process_latching
train
async def _process_latching(self, key, latching_entry): """ This is a private utility method. This method process latching events and either returns them via callback or stores them in the latch map :param key: Encoded pin :param latching_entry: a latch table entry ...
python
{ "resource": "" }
q18847
PymataCore._send_command
train
async def _send_command(self, command): """ This is a private utility method. The method sends a non-sysex command to Firmata. :param command: command data :returns: length of data sent """ send_message = "" for i in command: send_message +...
python
{ "resource": "" }
q18848
PymataCore._send_sysex
train
async def _send_sysex(self, sysex_command, sysex_data=None): """ This is a private utility method. This method sends a sysex command to Firmata. :param sysex_command: sysex command :param sysex_data: data for command :returns : No return value. """ if n...
python
{ "resource": "" }
q18849
PymataCore._wait_for_data
train
async def _wait_for_data(self, current_command, number_of_bytes): """ This is a private utility method. This method accumulates the requested number of bytes and then returns the full command :param current_command: command id :param number_of_bytes: how many bytes to...
python
{ "resource": "" }
q18850
PymataIOT.analog_write
train
async def analog_write(self, command): """ This method writes a value to an analog pin. It is used to set the output of a PWM pin or the angle of a Servo. :param command: {"method": "analog_write", "params": [PIN, WRITE_VALUE]} :returns: No return message. """ p...
python
{ "resource": "" }
q18851
PymataIOT.digital_write
train
async def digital_write(self, command): """ This method writes a zero or one to a digital pin. :param command: {"method": "digital_write", "params": [PIN, DIGITAL_DATA_VALUE]} :returns: No return message.. """ pin = int(command[0]) value = int(command[1]) ...
python
{ "resource": "" }
q18852
PymataIOT.disable_analog_reporting
train
async def disable_analog_reporting(self, command): """ Disable Firmata reporting for an analog pin. :param command: {"method": "disable_analog_reporting", "params": [PIN]} :returns: No return message.. """ pin = int(command[0]) await self.core.disable_analog_repo...
python
{ "resource": "" }
q18853
PymataIOT.disable_digital_reporting
train
async def disable_digital_reporting(self, command): """ Disable Firmata reporting for a digital pin. :param command: {"method": "disable_digital_reporting", "params": [PIN]} :returns: No return message. """ pin = int(command[0]) await self.core.disable_digital_re...
python
{ "resource": "" }
q18854
PymataIOT.enable_analog_reporting
train
async def enable_analog_reporting(self, command): """ Enable Firmata reporting for an analog pin. :param command: {"method": "enable_analog_reporting", "params": [PIN]} :returns: {"method": "analog_message_reply", "params": [PIN, ANALOG_DATA_VALUE]} """ pin = int(command...
python
{ "resource": "" }
q18855
PymataIOT.enable_digital_reporting
train
async def enable_digital_reporting(self, command): """ Enable Firmata reporting for a digital pin. :param command: {"method": "enable_digital_reporting", "params": [PIN]} :returns: {"method": "digital_message_reply", "params": [PIN, DIGITAL_DATA_VALUE]} """ pin = int(com...
python
{ "resource": "" }
q18856
PymataIOT.encoder_config
train
async def encoder_config(self, command): """ Configure 2 pins for FirmataPlus encoder operation. :param command: {"method": "encoder_config", "params": [PIN_A, PIN_B]} :returns: {"method": "encoder_data_reply", "params": [ENCODER_DATA]} """ pin_a = int(command[0]) ...
python
{ "resource": "" }
q18857
PymataIOT.encoder_read
train
async def encoder_read(self, command): """ This is a polling method to read the last cached FirmataPlus encoder value. Normally not used. See encoder config for the asynchronous report message format. :param command: {"method": "encoder_read", "params": [PIN_A]} :returns: {"meth...
python
{ "resource": "" }
q18858
PymataIOT.get_capability_report
train
async def get_capability_report(self): """ This method retrieves the Firmata capability report. Refer to http://firmata.org/wiki/Protocol#Capability_Query The command format is: {"method":"get_capability_report","params":["null"]} :returns: {"method": "capability_report_reply"...
python
{ "resource": "" }
q18859
PymataIOT.get_pinstate_report
train
async def get_pinstate_report(self, command): """ This method retrieves a Firmata pin_state report for a pin.. See: http://firmata.org/wiki/Protocol#Pin_State_Query :param command: {"method": "get_pin_state", "params": [PIN]} :returns: {"method": "get_pin_state_reply", "params"...
python
{ "resource": "" }
q18860
PymataIOT.get_protocol_version
train
async def get_protocol_version(self): """ This method retrieves the Firmata protocol version. JSON command: {"method": "get_protocol_version", "params": ["null"]} :returns: {"method": "protocol_version_reply", "params": [PROTOCOL_VERSION]} """ value = await self.core.ge...
python
{ "resource": "" }
q18861
signal_handler
train
def signal_handler(sig, frame): """Helper method to shutdown the RedBot if Ctrl-c is pressed""" print('\nYou pressed Ctrl+C') if board is not None: board.send_reset() board.shutdown() sys.exit(0)
python
{ "resource": "" }
q18862
_Tags.find_by_id
train
def find_by_id(self, tag, params={}, **options): """Returns the complete tag record for a single tag. Parameters ---------- tag : {Id} The tag to get. [params] : {Object} Parameters for the request """ path = "/tags/%s" % (tag) return self.client.get(pat...
python
{ "resource": "" }
q18863
_Tags.update
train
def update(self, tag, params={}, **options): """Updates the properties of a tag. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or el...
python
{ "resource": "" }
q18864
_Tags.delete
train
def delete(self, tag, params={}, **options): """A specific, existing tag can be deleted by making a DELETE request on the URL for that tag. Returns an empty data record. Parameters ---------- tag : {Id} The tag to delete. """ path = "/tags/%s" %...
python
{ "resource": "" }
q18865
_Tags.find_by_workspace
train
def find_by_workspace(self, workspace, params={}, **options): """Returns the compact tag records for all tags in the workspace. Parameters ---------- workspace : {Id} The workspace or organization to find tags in. [params] : {Object} Parameters for the request """ ...
python
{ "resource": "" }
q18866
_Tags.get_tasks_with_tag
train
def get_tasks_with_tag(self, tag, params={}, **options): """Returns the compact task records for all tasks with the given tag. Tasks can have more than one tag at a time. Parameters ---------- tag : {Id} The tag to fetch tasks from. [params] : {Object} Parameters for th...
python
{ "resource": "" }
q18867
_OrganizationExports.find_by_id
train
def find_by_id(self, organization_export, params={}, **options): """Returns details of a previously-requested Organization export. Parameters ---------- organization_export : {Id} Globally unique identifier for the Organization export. [params] : {Object} Parameters for the req...
python
{ "resource": "" }
q18868
_CustomFields.find_by_id
train
def find_by_id(self, custom_field, params={}, **options): """Returns the complete definition of a custom field's metadata. Parameters ---------- custom_field : {Id} Globally unique identifier for the custom field. [params] : {Object} Parameters for the request """ ...
python
{ "resource": "" }
q18869
_CustomFields.update
train
def update(self, custom_field, params={}, **options): """A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged When using this method,...
python
{ "resource": "" }
q18870
_CustomFields.delete
train
def delete(self, custom_field, params={}, **options): """A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. Returns an empty data record. Parameters ---------- custom_field : {Id} Globally unique identifier for...
python
{ "resource": "" }
q18871
_CustomFields.update_enum_option
train
def update_enum_option(self, enum_option, params={}, **options): """Updates an existing enum option. Enum custom fields require at least one enabled enum option. Returns the full record of the updated enum option. Parameters ---------- enum_option : {Id} Globally uniqu...
python
{ "resource": "" }
q18872
_CustomFields.insert_enum_option
train
def insert_enum_option(self, custom_field, params={}, **options): """Moves a particular enum option to be either before or after another specified enum option in the custom field. Parameters ---------- custom_field : {Id} Globally unique identifier for the custom field. [data] ...
python
{ "resource": "" }
q18873
_ProjectMemberships.find_by_project
train
def find_by_project(self, project, params={}, **options): """Returns the compact project membership records for the project. Parameters ---------- project : {Id} The project for which to fetch memberships. [params] : {Object} Parameters for the request - [user] : {Str...
python
{ "resource": "" }
q18874
_ProjectMemberships.find_by_id
train
def find_by_id(self, project_membership, params={}, **options): """Returns the project membership record. Parameters ---------- project_membership : {Id} Globally unique identifier for the project membership. [params] : {Object} Parameters for the request """ pa...
python
{ "resource": "" }
q18875
_Workspaces.find_by_id
train
def find_by_id(self, workspace, params={}, **options): """Returns the full workspace record for a single workspace. Parameters ---------- workspace : {Id} Globally unique identifier for the workspace or organization. [params] : {Object} Parameters for the request """ ...
python
{ "resource": "" }
q18876
_Workspaces.update
train
def update(self, workspace, params={}, **options): """A specific, existing workspace can be updated by making a PUT request on the URL for that workspace. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged. Currently the onl...
python
{ "resource": "" }
q18877
_Workspaces.add_user
train
def add_user(self, workspace, params={}, **options): """The user can be referenced by their globally unique user ID or their email address. Returns the full user record for the invited user. Parameters ---------- workspace : {Id} The workspace or organization to invite the user...
python
{ "resource": "" }
q18878
_Workspaces.remove_user
train
def remove_user(self, workspace, params={}, **options): """The user making this call must be an admin in the workspace. Returns an empty data record. Parameters ---------- workspace : {Id} The workspace or organization to invite the user to. [data] : {Object} Data for t...
python
{ "resource": "" }
q18879
_Attachments.find_by_id
train
def find_by_id(self, attachment, params={}, **options): """Returns the full record for a single attachment. Parameters ---------- attachment : {Id} Globally unique identifier for the attachment. [params] : {Object} Parameters for the request """ path = "/attachm...
python
{ "resource": "" }
q18880
_Attachments.find_by_task
train
def find_by_task(self, task, params={}, **options): """Returns the compact records for all attachments on the task. Parameters ---------- task : {Id} Globally unique identifier for the task. [params] : {Object} Parameters for the request """ path = "/tasks/%s/at...
python
{ "resource": "" }
q18881
Attachments.create_on_task
train
def create_on_task(self, task_id, file_content, file_name, file_content_type=None, **options): """Upload an attachment for a task. Accepts a file object or string, file name, and optional file Content-Type""" path = '/tasks/%d/attachments' % (task_id) return self.client.request('post', path, fil...
python
{ "resource": "" }
q18882
_Teams.find_by_id
train
def find_by_id(self, team, params={}, **options): """Returns the full record for a single team. Parameters ---------- team : {Id} Globally unique identifier for the team. [params] : {Object} Parameters for the request """ path = "/teams/%s" % (team) retu...
python
{ "resource": "" }
q18883
_Teams.find_by_organization
train
def find_by_organization(self, organization, params={}, **options): """Returns the compact records for all teams in the organization visible to the authorized user. Parameters ---------- organization : {Id} Globally unique identifier for the workspace or organization. [...
python
{ "resource": "" }
q18884
_Teams.find_by_user
train
def find_by_user(self, user, params={}, **options): """Returns the compact records for all teams to which user is assigned. Parameters ---------- user : {String} An identifier for the user. Can be one of an email address, the globally unique identifier for the user, or the keyw...
python
{ "resource": "" }
q18885
_Teams.users
train
def users(self, team, params={}, **options): """Returns the compact records for all users that are members of the team. Parameters ---------- team : {Id} Globally unique identifier for the team. [params] : {Object} Parameters for the request """ path = "/teams/%...
python
{ "resource": "" }
q18886
_Teams.add_user
train
def add_user(self, team, params={}, **options): """The user making this call must be a member of the team in order to add others. The user to add must exist in the same organization as the team in order to be added. The user to add can be referenced by their globally unique user ID or their ema...
python
{ "resource": "" }
q18887
_Teams.remove_user
train
def remove_user(self, team, params={}, **options): """The user to remove can be referenced by their globally unique user ID or their email address. Removes the user from the specified team. Returns an empty data record. Parameters ---------- team : {Id} Globally unique identifi...
python
{ "resource": "" }
q18888
Tasks.set_parent
train
def set_parent(self, task_id, params={}, **options): """Changes the parent of a task. Each task may only be a subtask of a single parent, or no parent task at all. Returns an empty data block. Parameters ---------- task : {Id} Globally unique identifier for the task. [da...
python
{ "resource": "" }
q18889
_Sections.create_in_project
train
def create_in_project(self, project, params={}, **options): """Creates a new section in a project. Returns the full record of the newly created section. Parameters ---------- project : {Id} The project to create the section in [data] : {Object} Data for the req...
python
{ "resource": "" }
q18890
_Sections.find_by_project
train
def find_by_project(self, project, params={}, **options): """Returns the compact records for all sections in the specified project. Parameters ---------- project : {Id} The project to get sections from. [params] : {Object} Parameters for the request """ path = "...
python
{ "resource": "" }
q18891
_Sections.find_by_id
train
def find_by_id(self, section, params={}, **options): """Returns the complete record for a single section. Parameters ---------- section : {Id} The section to get. [params] : {Object} Parameters for the request """ path = "/sections/%s" % (section) return...
python
{ "resource": "" }
q18892
_Sections.delete
train
def delete(self, section, params={}, **options): """A specific, existing section can be deleted by making a DELETE request on the URL for that section. Note that sections must be empty to be deleted. The last remaining section in a board view cannot be deleted. ...
python
{ "resource": "" }
q18893
_Sections.insert_in_project
train
def insert_in_project(self, project, params={}, **options): """Move sections relative to each other in a board view. One of `before_section` or `after_section` is required. Sections cannot be moved between projects. At this point in time, moving sections is not support...
python
{ "resource": "" }
q18894
_Stories.find_by_id
train
def find_by_id(self, story, params={}, **options): """Returns the full record for a single story. Parameters ---------- story : {Id} Globally unique identifier for the story. [params] : {Object} Parameters for the request """ path = "/stories/%s" % (story) ...
python
{ "resource": "" }
q18895
_Stories.update
train
def update(self, story, params={}, **options): """Updates the story and returns the full record for the updated story. Only comment stories can have their text updated, and only comment stories and attachment stories can be pinned. Only one of `text` and `html_text` can be specified. P...
python
{ "resource": "" }
q18896
_Stories.delete
train
def delete(self, story, params={}, **options): """Deletes a story. A user can only delete stories they have created. Returns an empty data record. Parameters ---------- story : {Id} Globally unique identifier for the story. """ path = "/stories/%s" % (story) ret...
python
{ "resource": "" }
q18897
_Tasks.find_by_id
train
def find_by_id(self, task, params={}, **options): """Returns the complete task record for a single task. Parameters ---------- task : {Id} The task to get. [params] : {Object} Parameters for the request """ path = "/tasks/%s" % (task) return self.client....
python
{ "resource": "" }
q18898
_Tasks.update
train
def update(self, task, params={}, **options): """A specific, existing task can be updated by making a PUT request on the URL for that task. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is ...
python
{ "resource": "" }
q18899
_Tasks.delete
train
def delete(self, task, params={}, **options): """A specific, existing task can be deleted by making a DELETE request on the URL for that task. Deleted tasks go into the "trash" of the user making the delete request. Tasks can be recovered from the trash within a period of 30 days; after...
python
{ "resource": "" }