Skip to content

Instantly share code, notes, and snippets.

View robholland's full-sized avatar

Rob Holland robholland

View GitHub Profile

Clearbit API versions

Your API version controls the API and webhook behavior you see (e.g. what properties you see in responses, what parameters you’re permitted to send in requests, etc.). Your version gets set the first time you make an API request. When we change any of our APIs in a backwards-incompatible way, we release a new dated version, but to avoid breaking your code, we don’t change your version until you're ready to upgrade.

How can I upgrade versions?

Each of Clearbit's APIs is versioned separately. You can set the API version on a per-request basis, or globally in your dashboard. It's a good idea to keep the API version you're using up to date - we're often pushing shiny new data attributes.

API changelog

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>GreyMapper Demo</title>
<script type="text/javascript" src="mootools-1.2.1-core-yc.js"></script>
<script type="text/javascript" src="occlude.js"></script>
<script type="text/javascript" src="visibility.js"></script>
<script type="text/javascript">
# RSpec
require 'spec/expectations'
# Webrat
require 'webrat'
Webrat.configure do |config|
config.mode = :sinatra
end
World do
Scenario: Check balance amounts
Given accounts like
| name | balance |
| Current | 5 |
| Savings | 10 |
When I visit the accounts page
Then the account list should look like
| name | balance |
| Current | 5.00 |
| Savings | 10.00 |
Then /the (.*) list should look like$/ do |type, table|
columns = table.raw[0]
response.body.should have_selector("##{type}_list") { |list|
table.hashes.each_with_index do |row, index|
list.should have_selector(".#{type}") { |item|
columns.each { |column| item.should have_selector("*[text()='#{row[column]}']")}
}
end
}
end
def be_like(expected_values)
case expected_values
when Cucumber::Ast::Table
expected_values = expected_values.hashes
end
simple_matcher do |actual_values|
expected_values.each_with_index do |expected_hash, index|
unless actual_hash = actual_values[index]
# FIXME: Find a nicer way to get a useful error message
t1_setup = false
t2_setup = false
$bad = true
m = Thread.new do
begin
t = Thread.new do
begin
t2_setup = true
sleep
it "runs nested ensure clauses" do
thread = ThreadSpecs.nested_dying_thread_ensures(@method) { ScratchPad.record :in_ensure_clause }
thread.join
ScratchPad.recorded.should == :in_ensure_clause
end
def self.nested_dying_thread_ensures(kill_method_name=:kill)
o = Thread.new do
begin
t = Thread.new do
#!/usr/bin/env jruby
require 'monitor'
class WorkerToken
end
class WorkerGroup
LIMIT = 1
Complete Java stackTrace
java.lang.IllegalAccessException: Class org.jruby.internal.runtime.methods.ReflectedJavaMethod can not access a member of class org.jruby.ext.ffi.jna.JNAInvoker with modifiers "public static"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.reflect.Method.invoke(Method.java:607)
at org.jruby.internal.runtime.methods.ReflectedJavaMethod.call(ReflectedJavaMethod.java:142)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:136)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:243)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:32)
at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:59)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)