What Facebook uses to define the url in a batch
617
@JsonProperty("relative_url")
	public String getRelativeURL() {
		StringBuilder bld = new StringBuilder();
		bld.append(this.object);
		
		Param[] params = this.getParams();
		
		if (params != null && params.length > 0) {
			bld.append('?');
			boolean afterFirst = false;
			
			for (Param param: params) {
				if (afterFirst)
					bld.append('&');
				else
					afterFirst = true;
				
				if (param instanceof BinaryParam) {
					//call.addParam(param.name, (InputStream)param.value, ((BinaryParam)param).contentType, "irrelevant");
					throw new UnsupportedOperationException("Not quite sure what to do with BinaryParam yet");
				} else {
					String paramValue = StringUtils.stringifyValue(param, this.mapper);
					bld.append(StringUtils.urlEncode(param.name));
					bld.append('=');
					bld.append(StringUtils.urlEncode(paramValue));
				}
			}
		}
		
		return bld.toString();
	}
469400
function favorites_update_batch( $tid, $tag )
	{
		$params = array();
		$params['tid'] = $tid;
		$params['tag'] = $tag;
		return $this->oauth->post( 'favorites/tags/update_batch', $params);
	}
2210
def _make_url(major, minor, micro, releaselevel, serial):
    """"""
    url = "https://django-pagination-bootstrap.readthedocs.io"
    if releaselevel != 'final':
        # For pre-releases, use a version-specific URL.
        url += "/en/" + _make_version(major, minor, micro, releaselevel, serial)
    return url
987919
function parseUrls(text, options, callback) {
	var urls = [],
		words,
		x = 0,
		i;

	// is a text string
	if (text && utils.isString(text) && text !== '') {

		// break texts into words
		words = [text];
		if (text.indexOf(' ') > -1) {
			words = text.split(' ');
		}

		// finds urls in text
		i = words.length;
		while (x < i) {
			var word = utils.trim(words[x]);

			if (word.indexOf('http:') === 0 || word.indexOf('https:') === 0) {
				urls.push({
					match: word,
					url: word
				});

			} else if (word.indexOf('pic.twitter.com/') === 0) {
				urls.push({
					match: word,
					url: 'https://' + word
				});

			} else if (word.indexOf('vine.co/v/') === 0) {
				urls.push({
					match: word,
					url: 'https://' + word
				});

			}
			x++;
		}

	}
	callback(null, urls);
}
276366
def get_batch(sequence, size, start=0, endpoint=None, complete=False):
    

    batch = make_batch(sequence, size, start)

    return {
        "pagesize": batch.get_pagesize(),
        "next": batch.make_next_url(),
        "previous": batch.make_prev_url(),
        "page": batch.get_pagenumber(),
        "pages": batch.get_numpages(),
        "count": batch.get_sequence_length(),
        "items": make_items_for([b for b in batch.get_batch()],
                                endpoint, complete=complete),
    }
1358265
def urljoin(*args):
        
        return "/".join(map(lambda x: str(x).rstrip('/'), args)).rstrip('/')
1091001
def get(context, request, key=None):
    
    registry_records = api.get_registry_records_by_keyword(key)

    # Prepare batch
    size = req.get_batch_size()
    start = req.get_batch_start()
    batch = api.make_batch(registry_records, size, start)

    return {
        "pagesize": batch.get_pagesize(),
        "next": batch.make_next_url(),
        "previous": batch.make_prev_url(),
        "page": batch.get_pagenumber(),
        "pages": batch.get_numpages(),
        "count": batch.get_sequence_length(),
        "items": [registry_records],
        "url": api.url_for("senaite.jsonapi.v1.registry", key=key),
    }
409129
private TitledUrl findFormattedUrl(TextCursor cursor, int limit) {
        start_loop:
        for (int start = cursor.currentOffset; start < limit; start++) {

            // Finding beginning of url
            if (cursor.text.charAt(start) == '[') {
                if (!isGoodAnchor(cursor.text, start - 1)) {
                    continue start_loop;
                }
            } else {
                continue start_loop;
            }

            // Finding middle part of url
            middle_loop:
            for (int middle = start + 1; middle < limit - 1; middle++) {
                if (cursor.text.charAt(middle) != ']' || cursor.text.charAt(middle + 1) != '(') {
                    continue middle_loop;
                }

                end_loop:
                for (int end = middle + 2; end < limit; end++) {
                    if (cursor.text.charAt(end) != ')') {
                        continue end_loop;
                    }
                    return new TitledUrl(start, middle, end);
                }
            }
        }

        return null;
    }
218293
function(bin) {
      var url = app.set('url full');

      if (!bin) {
        return;
      }

      if (bin.url) {
        url += '/' + bin.url;

        if (bin.revision && bin.revision !== 1) {
          url += '/' + bin.revision;
        }
      }
      return url;
    }
65559
public boolean fbml_refreshRefUrl(URL url)
    throws FacebookException, IOException {
    return extractBoolean(this.callMethod(FacebookMethod.FBML_REFRESH_REF_URL,
                                          new Pair<String, CharSequence>("url", url.toString())));
  }
1003379
def mk_url(self, *args, **kwargs):
        
        params = urlencode(kwargs)
        url = '/' + '/'.join([x for x in args if x])
        if params:
            url += '?' + params
        return url
1004381
def build_url_chunks(self):
        
        CHUNK_SIZE = 500

        id_filter = str(self.api_filters.pop(self.id_filter)).split(',')
        chuncks = list(self.chunks(id_filter, CHUNK_SIZE))
        filters = '&'.join("%s=%s" % (k, v) for (k, v) in self.api_filters.items())

        for chunk in chuncks:
            if filters:
                url = "{0}?{1}&{2}={3}".format(self.url, filters, self.id_filter, ','.join(chunk))
            else:
                url = "{0}?{1}={2}".format(self.url, self.id_filter, ','.join(chunk))
            self.split_urls.append(url)
708214
private function _batchUrl($batchId, $subPath = '')
    {
        $ebid = rawurlencode($batchId);

        if (empty($ebid)) {
            throw new \InvalidArgumentException("Empty batch ID given");
        }

        return $this->_url('/batches/' . $ebid . $subPath);
    }
1181743
private function getCallbackUrl($callback_url)
    {
        $callback_url = $callback_url ?: $this->config_handler->get('laravel-facebook-sdk.default_redirect_uri');

        return $this->url->to($callback_url);
    }
1240599
function generateURL (name) {
  return name
    .toLowerCase()
    .split('')
    .map(char => {
      if (char === ' ') return '-'
      if (specials.includes(char)) return mapped[ specials.indexOf(char) ]
      return char
    })
    .join('')
}
947660
def url(self):
        """"""
        urlparts = self._url
        if self.__post__:
            urlparts = list(urlparts)
            urlparts[3] = '' # Clear out query string on POST
            if self.__token__ is not None: # But not the token
                urlparts[3] = compat.urlencode({'token': self.__token__})
        return compat.urlunsplit(urlparts)
858187
void doBatchEnd(String batch, Object args) {
    checkOpen();
    JsonObject message = createMessage(args)
        .putString("action", "endBatch")
        .putString("batch", batch);
    if (open && !paused) {
      if (log.isDebugEnabled()) {
        log.debug(String.format("%s - Batch end: Batch[batch=%s, args=%s]", this, batch, args));
      }
      eventBus.send(inAddress, message);
    }
    if (currentBatch != null && currentBatch.id().equals(batch)) {
      currentBatch = null;
    }
  }