Get a pin object

@access public
@param  string   $pin_id
@param array     $data
@throws \DirkGroenen\Pinterest\Exceptions\PinterestException
@return Pin
427762
public function get($pin_id, array $data = [])
    {
        $response = $this->request->get(sprintf("pins/%s", $pin_id), $data);
        return new Pin($this->master, $response);
    }
741370
protected static Pin createDigitalPin(int address, String name) {
        return createDigitalPin(OrangePiGpioProvider.NAME, address, name);
    }
1086275
public String getPinResults() {

        String pinResults = "";
        for (int i = 0; i < mNumberPinBoxes; i++) {
            String pinBoxValue = getPinBox(i).getText().toString();
            if (pinBoxValue.isEmpty()) {
                pinBoxValue = " ";
            }
            pinResults += pinBoxValue;
        }
        return pinResults;
    }
631875
public function apiGet($action, $data = [ ], $method = 'GET', $options = [ ]) {
        return $this->httpRequest($action, $this->prepareJsonPayload($data), $method, $options);
    }
452022
def delete_pin(id, options = {})
      id = id.to_sym
      # Check if this is a Pin or a PinGroup
      if pin_groups.key? id
        Origen.pin_bank.delete_pingroup(Origen.pin_bank.find_pin_group(id, options))
      elsif pins(id).class.to_s.match(/Pin/)
        Origen.pin_bank.delete_pin(Origen.pin_bank.find(id, options))
      else
        fail "Error: the object #{id} you tried to delete is not a pin or pingroup"
      end
    end
889906
static function get($post_id)
	{
		global $db;
		//$sql = "SELECT p.*, t.topic_first_post_id, t.topic_last_post_id
		//		FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
		//		WHERE p.post_id=" . intval($this->post_id) . " AND t.topic_id = p.topic_id";
		$sql = "SELECT * FROM " . POSTS_TABLE . " WHERE post_id=" . intval($post_id);
		$result = $db->sql_query($sql);
		$post_data = $db->sql_fetchrow($result);
		$db->sql_freeresult($result);

		if(!$post_data)
		{
			//post does not exist, return false
			return false;
		}


		return post::from_array($post_data);
	}
275417
public function setPinCode($pinCode)
    {
        if (!Icepay_Parameter_Validation::pinCode($pinCode))
            throw new Exception('Pincode not valid');

        $this->_pinCode = (string) $pinCode;

        return $this;
    }
298815
def get_pin(self, _code=None):
        """"""
        description = (
            'Use the numeric keypad to describe number positions.\n'
            'The layout is:\n'
            '    7 8 9\n'
            '    4 5 6\n'
            '    1 2 3')
        return interact(
            title='{} PIN'.format(self.device_name),
            prompt='PIN:',
            description=description,
            binary=self.pin_entry_binary,
            options=self.options_getter())
979479
public function requestIdn($data = array())
    {
        if (count($data) == 0) {
            $this->errorMessage[] = 'IDN DATA: EMPTY';
            return $this->nameData();
        }
        $data['MERCHANT'] = $this->merchantId;
        $this->refnoext = $data['REFNOEXT'];
        unset($data['REFNOEXT']);

        foreach ($this->hashFields as $fieldKey) {
            $data2[$fieldKey] = $data[$fieldKey];
        }
        $irnHash = $this->createHashString($data2);
        $data2['ORDER_HASH'] = $irnHash;
        $this->idnRequest = $data2;
        $this->logFunc("IDN", $this->idnRequest, $this->refnoext);

        $result = $this->startRequest($this->targetUrl, $this->idnRequest, 'POST');
        $this->debugMessage[] = 'IDN RESULT: ' . $result;

        if (is_string($result)) {
            $processed = $this->processResponse($result);
            $this->logFunc("IDN", $processed, $this->refnoext);
            return     $processed;
        }
        $this->debugMessage[] = 'IDN RESULT: NOT STRING';
        return false;
    }
785980
public static function getOrFail($data = [], Entity $entity = null, callable $callable = null)
    {
        if (!$entity) {
            $entity = (new static)->getEntity();
        }

        if (is_scalar($data)) {
            return $entity->where('id', $data)->oneOrFail($callable);
        } else {
            return $entity->whereArr($data)->oneOrFail($callable);
        }
    }
171620
def pin(value):
    ''''''
    if value is False:
        return draw_pin('Build Failed', 'red')
    elif value is True:
        return draw_pin('Build Passed')
    elif value is NOT_FOUND:
        return draw_pin('Build N / A', 'lightGray', 'black')
    return draw_pin('In progress ...', 'lightGray', 'black')
1179153
def all_other_pins(id = nil, _options = {}, &_block)
      if id
        pin = Origen.pin_bank.find(id, ignore_context: true, other_pin: true)
      else
        Origen.pin_bank.all_other_pins
      end
    end
617420
public function sendRequest($action, $data = null, $method = RequestInterface::POST)
    {
        // don't throw exceptions for 4xx errors
        $this->httpClient->getEventDispatcher()->addListener(
            'request.error',
            function ($event) {
                if ($event['response']->isClientError()) {
                    $event->stopPropagation();
                }
            }
        );

        // Return the response we get back from Pin Payments
        return $this->httpClient->createRequest(
            $method,
            $this->getEndpoint() . $action,
            array('Authorization' => 'Basic ' . base64_encode($this->getSecretKey() . ':')),
            $data
        )->send();
    }
53929
public function set(array $data, $id = null) {
        $id = null === $id ? $this->idGen++ : $id;
        $this->data[$id] = $data;
        self::$dirty[$this->class] = true;
        return $id;
    }
809536
def get_pin_codes(self, refresh=False):
        
        if refresh:
            self.refresh()
        val = self.get_value("pincodes")

        # val syntax string: <VERSION=3>next_available_user_code_id\tuser_code_id,active,date_added,date_used,PIN_code,name;\t...
        # See (outdated) http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#DoorLock1

        # Remove the trailing tab
        # ignore the version and next available at the start
        # and split out each set of code attributes
        raw_code_list = []
        try:
            raw_code_list = val.rstrip().split('\t')[1:]
        except Exception as ex:
            logger.error('Got unsupported string {}: {}'.format(val, ex))

        # Loop to create a list of codes
        codes = []
        for code in raw_code_list:

            try:
                # Strip off trailing semicolon
                # Create a list from csv
                code_addrs = code.split(';')[0].split(',')

                # Get the code ID (slot) and see if it should have values
                slot, active = code_addrs[:2]
                if active != '0':
                    # Since it has additional attributes, get the remaining ones
                    _, _, pin, name = code_addrs[2:]
                    # And add them as a tuple to the list
                    codes.append((slot, name, pin))
            except Exception as ex:
                logger.error('Problem parsing pin code string {}: {}'.format(code, ex))
        
        return codes
995732
def exchange_pin(self, pin):
        """"""
        params = {'client_id': self.client_id,
                  'client_secret': self.client_secret,
                  'grant_type': 'pin',
                  'pin': pin}
        result = self._send_request(EXCHANGE_URL.format(self._base_url),
                                    params=params, method='POST',
                                    data_field=None)
        self.access_token = result['access_token']
        self.refresh_token = result['refresh_token']
        return self.access_token, self.refresh_token
198721
public function tryIt($pinId, $comment, $pathToImage = null)
    {
        $data = $this->makeRequest($pinId, $comment, $pathToImage);

        $this->post(UrlBuilder::RESOURCE_TRY_PIN_CREATE, $data);

        return $this->getResponse()->getResponseData();
    }