File tree 2 files changed +0
-60
lines changed
2 files changed +0
-60
lines changed Original file line number Diff line number Diff line change 2
2
3
3
(defn clojure-stylify [key]
4
4
(keyword (clojure.string/replace key #"_" " -" )))
5
-
6
- (defn get-gfycats-with [keys search-result]
7
- " returns list of gfycats with selected parameters,
8
- removes all other parameters
9
- possible params:
10
- :title
11
- gifs urls:
12
- :gif100px
13
- :max2mbgif
14
- :gifurl
15
- :mp4url
16
- :webmurl
17
- :max1mbgif
18
- other:
19
- :framerate
20
- :gfynumber
21
- :width
22
- :gatekeeper
23
- :mobileposterurl
24
- :source
25
- :likes
26
- :curated
27
- :createdate
28
- :languagetext2
29
- :nsfw
30
- :extralemmas
31
- :hasaudio
32
- :max5mbgif
33
- :languagecategories
34
- :mp4size
35
- :url
36
- :mobileurl
37
- :gfyid
38
- :gfyname
39
- :posterurl
40
- :hastransparency
41
- :webpurl
42
- :username
43
- :published
44
- :rating
45
- :height
46
- :views
47
- :description
48
- :tags
49
- :webmsize
50
- :gfyslug
51
- :miniurl
52
- :numframes
53
- :dislikes
54
- :avgcolor
55
- :miniposterurl
56
- :thumb100posterurl
57
- :domainwhitelist"
58
- (map #(select-keys % keys) (:gfycats search-result)))
Original file line number Diff line number Diff line change 3
3
[clojure.test :refer [deftest is testing]]
4
4
[gfycat-api.fixtures :as fixtures]
5
5
[gfycat-api.util :as util]))
6
-
7
- (deftest search-result-filtering
8
- (is (= (util/get-gfycats-with [:title :gfyId ] fixtures/single-gfycat-search-result)
9
- '({:title
10
- " Canadian Flag waving animated using MIR plug in after effects - free motion graphics"
11
- :gfyId " fondfocusedclownanemonefish" }))))
You can’t perform that action at this time.
0 commit comments