Permalink
Browse files

move functions around to be in the same order as the list at http://m…

  • Loading branch information...
1 parent dc9459a commit ef31ba96271b389cd1b7015411d1921c5231e516 @shawnps committed May 20, 2012
Showing with 44 additions and 44 deletions.
  1. +44 −44 mygengo.rkt
View
@@ -136,50 +136,6 @@
(format "translate/job/~s/feedback" job-id)
mygengo-user))
-; http://mygengo.com/api/developer-docs/methods/translate-job-id-comment-post/
-(define (get-job-comments job-id mygengo-user)
- (get-request-auth-required
- (format "translate/job/~s/comments" job-id)
- mygengo-user))
-
-; http://mygengo.com/api/developer-docs/methods/translate-job-id-get/
-(define (get-job job-id mygengo-user [pre-mt #f])
- (define optional-params
- (if pre-mt (cons 'pre_mt "1") null))
- (get-request-auth-required
- (format "translate/job/~s" job-id)
- mygengo-user
- optional-params))
-
-; http://mygengo.com/api/developer-docs/methods/translate-jobs-group-get/
-(define (get-job-group group-id mygengo-user)
- (get-request-auth-required
- (format "translate/jobs/group/~s" group-id)
- mygengo-user))
-
-; http://mygengo.com/api/developer-docs/methods/translate-jobs-ids-get/
-(define (get-jobs list-of-job-ids mygengo-user)
- (get-request-auth-required
- (format "translate/jobs/~a"
- (string-join (map number->string list-of-job-ids) ","))
- mygengo-user))
-
-; http://mygengo.com/api/developer-docs/methods/
-; translate-service-language-pairs-get/
-(define (get-language-pairs mygengo-user [lc-src null])
- (define optional-params
- (if (not (null? lc-src)) (cons 'lc_src lc-src) null))
- (get-request-no-auth
- "translate/service/language_pairs"
- mygengo-user
- optional-params))
-
-; http://mygengo.com/api/developer-docs/methods/translate-service-languages-get/
-(define (get-languages mygengo-user)
- (get-request-no-auth
- "translate/service/languages"
- mygengo-user))
-
; http://mygengo.com/api/developer-docs/methods/translate-job-id-comment-post/
(define (post-job-comment job-id comment mygengo-user)
(define data-hash (make-hash))
@@ -189,12 +145,27 @@
(jsexpr->json data-hash)
mygengo-user))
+; http://mygengo.com/api/developer-docs/methods/translate-job-id-comment-post/
+(define (get-job-comments job-id mygengo-user)
+ (get-request-auth-required
+ (format "translate/job/~s/comments" job-id)
+ mygengo-user))
+
; http://mygengo.com/api/developer-docs/methods/translate-job-id-delete/
(define (delete-job job-id mygengo-user)
(delete-request
(format "translate/job/~s" job-id)
mygengo-user))
+; http://mygengo.com/api/developer-docs/methods/translate-job-id-get/
+(define (get-job job-id mygengo-user [pre-mt #f])
+ (define optional-params
+ (if pre-mt (cons 'pre_mt "1") null))
+ (get-request-auth-required
+ (format "translate/job/~s" job-id)
+ mygengo-user
+ optional-params))
+
; http://mygengo.com/api/developer-docs/methods/translate-job-id-put/
(define (revise-job job-id comment mygengo-user)
(define data-hash (make-hash))
@@ -246,6 +217,19 @@
(jsexpr->json data)
mygengo-user))
+; http://mygengo.com/api/developer-docs/methods/translate-jobs-group-get/
+(define (get-jobs-by-group group-id mygengo-user)
+ (get-request-auth-required
+ (format "translate/jobs/group/~s" group-id)
+ mygengo-user))
+
+; http://mygengo.com/api/developer-docs/methods/translate-jobs-ids-get/
+(define (get-jobs-by-ids list-of-job-ids mygengo-user)
+ (get-request-auth-required
+ (format "translate/jobs/~a"
+ (string-join (map number->string list-of-job-ids) ","))
+ mygengo-user))
+
; http://mygengo.com/api/developer-docs/methods/translate-jobs-post/
(define (post-jobs jobs-json mygengo-user [as-group null])
(define data (read-json (open-input-file jobs-json)))
@@ -255,6 +239,22 @@
(jsexpr->json data)
mygengo-user))
+; http://mygengo.com/api/developer-docs/methods/
+; translate-service-language-pairs-get/
+(define (get-language-pairs mygengo-user [lc-src null])
+ (define optional-params
+ (if (not (null? lc-src)) (cons 'lc_src lc-src) null))
+ (get-request-no-auth
+ "translate/service/language_pairs"
+ mygengo-user
+ optional-params))
+
+; http://mygengo.com/api/developer-docs/methods/translate-service-languages-get/
+(define (get-languages mygengo-user)
+ (get-request-no-auth
+ "translate/service/languages"
+ mygengo-user))
+
; http://mygengo.com/api/developer-docs/methods/translate-service-quote-post/
(define (jobs-quote jobs-json mygengo-user)
(define data (read-json (open-input-file jobs-json)))

0 comments on commit ef31ba9

Please sign in to comment.