 
 #=====================================================================
 
-d = { "username" : "tacovontaco", "password" : "yoyoma", 
-"consumer_key" : "5mWTsSzItVHdxaJfYi00Rw", 
-"consumer_secret" : "Hzz6fqwxrbAkKcPKjvtnqU1FN0OYi7gu93dS0gNbQ", 
-token : "2209163989-lTgnNUDINbH1ijvSyvO62CuMzyRCi3R6uOIfcHN", 
-token_secret : "gtskJSncqLQ7r9bXNnFcanfp1liW687KvYmbr30FLKheC" }
-
-test = (cb) ->
-  await tweet_scrape d, process.argv[2], defer err
-  cb err
+exports.tweet_api = tweet_api = (d, status, cb) ->
+  await request.post {
+    url : "https://api.twitter.com/1.1/statuses/update.json",
+    form : {status }
+    oauth : d
+    json : true
+  }, defer err, res, body
+  cb err, body.id
 
 #=====================================================================
-
-tweet = (cb) ->
-  await request.post {
-    url : "https://api.twitter.com/1.1/statuses/update.json",
-    form : {
-      status : "this is the new way"
-    }
-    oauth : d
-  }, defer err, res, body
-  console.log err
-  console.log body
-
-
-
-await test defer err
-console.log err

      'remember_me' : 1
      'scribe_log' : ""
    path = "/sessions"
    console.log "fuuuuuck"
    console.log form
    await @load_page { status : [302,200], path , form, method : "POST" }, defer err, body, res
    console.log body
    console.log res
    cb err

  #---------------------------------

{a_json_parse,katch} = require('iced-utils').util
{make_esc} = require('iced-error')
util = require 'util'

#=====================================================================

