拒絕各種事有各種不同說法, 我們一起來學學吧!
1. I am sorry to turn you down.
我很抱歉必須拒絕你.
- turn sb down, turn down sb
** turn sb down 不是 let sb down 喔!
2. I am not interested.
我沒有興趣.
3. I'll think about it.
我要考慮看看.
4. I can't afford it
我付不起.
5. I can't handle it.
我應付不來.
這個 handle 跟 afford 的區別要分清楚, handle 指的是事情上應付不來, 而 afford 多半指金錢上無法負擔.
--口語上handle 也有敷衍的意思:Are you handling me?
6. I am really not in the mood.
我真的沒有什麼心情.
7. There is nothing to talk about.
沒什麼好說的.
當別人問你的問題你不想回答或懶得回答時就可以回答, "There is nothing to talk about." 例如有人問你考試考幾分? 你自己考得太差而不想講, 就可以說, "There is nothing to talk about." 另外一個類似的用法叫 "No comment." 就是說無可奉告的意思.
8. I really want to, but I got hundreds of things to do.
我想去, 可是我有好多好多事情要做.
9. I don't want to go and that's that.
我不想去, 就是這樣.
That's that 通常是接在否定句後, 意思是, 就這樣了, 不必再多說了. 這樣的語氣是很強烈的, 通常聽的人可能會不太高興.
"That's that." 這句話跟 "That's it." 不太一樣, "That's it." 的意思是就這樣吧, 就這些吧, 在點餐時會用的到. That's that 則是表示不想再跟對方談下去了, 同樣的情況, 你也可以這麼說, "The conversation is over." 我想這個意思也很明顯了.
10. That's enough, anymore is just overkill.
那就夠了, 再多一點也是多餘的.
歡迎分享
「turn down用法」的推薦目錄:
- 關於turn down用法 在 EN English Facebook
- 關於turn down用法 在 Hapa Eikaiwa Facebook
- 關於turn down用法 在 玳瑚師父 Master Dai Hu Facebook
- 關於turn down用法 在 turn it down意思-在PTT/IG/網紅社群上服務品牌流行穿搭 的評價
- 關於turn down用法 在 turn on me 背叛我| be turned off by 被人搞得很不開心| 吉娜英文 的評價
- 關於turn down用法 在 YouTube Data API Overview - Google Developers 的評價
turn down用法 在 Hapa Eikaiwa Facebook 八卦
=================================
「Would」の活用法(総まとめ)
=================================
これまで私が生徒さんから最もよくされた質問の一つが「would」の使い方でしょう。wouldを用いた表現は本当に沢山あり、それら全てを説明するのは容易ではありません。そこで今回、過去の記事でも紹介した用法を含め、日常会話において基本となるwouldの用法を、4つの状況毎になるべく分かりやすくまとめてみました。長くなりますが、どうぞ最後まで読んでみて下さい。
~過去の話をする時~
--------------------------------------------------
1) I thought it would rain.
→「雨が降ると思っていました」
--------------------------------------------------
過去のある時点で、その先に起こることを予め予測や推測をしていたことを示す言い方です。例えば、「I thought it would rain so I brought an umbrella.(雨が降ると思っていたので、傘を持ってきました)」や「Since I was a kid, I knew I would become a teacher.(私は子供の時から先生になると分かっていました)」のように表現できます。
また、「He said he would _____.(彼が〜すると言っていました)」のように誰かが(過去に)言ったことを他の誰かに伝える状況でも使われます。ポイントは、誰かが何かをすると約束したり、何かをすると意思を述べたことを、他の誰かに伝える状況で用いるのが一般的です。例えば、「He said he would buy coffee for us.(彼は私たちにコーヒーを買うと言っていました。)」や「She said she would talk to him about that issue.(その問題について、彼女は彼に話すと言っていました)」という具合に使われます。
✔Wouldの後は動詞の原形がフォロー。
<例文>
When I met my wife 5 years ago, I knew I would marry her one day.
(5年前に妻と出会った当初から、私たちは結婚すると思っていました。)
I never thought this proposal would go through.
(この提案が通らないことは最初から分かっていました。)
She said she would come to the party.
(彼女はパーティーに来ると言っていました。)
--------------------------------------------------
2) She would not help me.
→「彼女は手伝ってくれようとしませんでした」
--------------------------------------------------
Wouldの後にnotを付け、否定文(Would not)にすることで「〜しようとしなかった」という意味になります。基本的に何かしらの依頼や申し出に対し、乗り気じゃない、協力的じゃない、積極的に応える意欲がない、などのニュアンスで断ったことを表します。例えば、親に何度も仕送りをして欲しいと頼んでるが、いっこうにしてくれない状況では「My parents would not send me money.(私の両親は、仕送りをしようとしてくれない)」と言うことができます。
また、人に限らずテレビやパソコン、車などの機能に対してもwould notを使うことができます。例えば、「今朝、車のエンジンがかかりませんでした」は「My car would not start this morning.」となります。
✔肯定文にしても「〜してくれた」とはならず、意味が変わってしまうので注意。「My parents would send me money」と言うと「両親が仕送りをしてくれた」とはならずに、「両親が(何度も)送金した」を意味する。詳しくは下記の3)の解説を参照。
<例文>
I asked him many times but he would not tell me what happened.
(彼に何回も聞きましたが、何が起こったのか教えてくれませんでした。)
My girlfriend is really upset with me. She would not talk to me.
(彼女は私に怒っていて口をきいてくれませんでした。)
I charged my phone but it would not turn on.
(携帯を充電したけど電源が入らなかった。)
--------------------------------------------------
3) In the summer, I would go camping with my friends.
→「夏によく友達とキャンピングに行っていました」
--------------------------------------------------
過去によくやっていた行動パターンや習慣を表す際にもwouldが使われ、used to(よく~したものだ)と似たような役割を果たします。しかし、used toの場合は、習慣となっている行動がより高頻度なもので、且つ“今はもうしていない”ということを強調するニュアンスがあるのに対し、wouldの場合は、習慣となっていた行動頻度が週1回であろうと年1回であろうと、その頻度には関係なく「よく〜した」ということが話の趣旨となります。例えば、「When I was a kid, my grandmother would bake cookies.(子供の頃、私の祖母はよくクッキーを焼いてくれていました)」と言うと、クッキーを作る頻度ではなく、祖母がクッキーを作ってくれていたことが要点になります。それに対し、「私は高校生の頃、毎日サッカーの練習をしていました」と言いたいのであれば、used toを使って、「I used to practice soccer every day in high school.」と言うのが適切です。“毎日練習していた”ことが強調され、且つ“今はもう練習をしていない”ことが相手に伝わります。
✔過去の“状態”を表す場合はwouldではなくused toを使う。例えば「過去にオートバイを持っていました」は「I used to have a motorocycle.」と言い、「I would have a motorcycle」とは言わない。
<例文>
When I lived in Japan, I would go out drinking almost every week.
(日本に住んでいた頃、ほぼ毎週飲みに行っていました。)
Sometimes she would come over and cook Mexican food for us.
(時々、彼女はうちにきてメキシカン料理を作ってくれました。)
During the winter, I would get together with my friends and do a nabe party.
(冬に友達とよく鍋パーティーをしていました。)
~仮定の話をする時~
--------------------------------------------------
1) If I won the lottery I would buy a house.
→「もし宝くじが当たったら家を買います」
架空の話や実際には起こり得ない出来事について話す時にもwouldを使います。一般的に「If _____, I would _____.(〜だったら〜する)」の形式で表現します。例えば、「世界中のどこにでも住めるとしたら、ハワイに住みます」は「If I could live anywhere in the world, I would live in Hawaii.」と言います。
✔文末に「if I knew」に付け足してもOK。
<例文>
If you could date a celebrity, who would it be?
(もし、芸能人と付き合えるとしたら、誰と付き合う?)
I would tell you where she was if I knew.
(彼女がどこにいるか知っていたら教えているよ。)
If I found a hundred dollars on the ground, I would take it to the police station.
(もし100ドルを拾ったら交番に届けます。)
--------------------------------------------------
2) Would you try online dating?
→「あなただったら出会い系サイトを試してみますか?」
--------------------------------------------------
相手に“もしも”の質問を投げかける時は「Would you _____?」と表現するのが定番で「あなただったら〜しますか?」を意味します。相手の意見やアドバイスを尋ねる場合は「What would you _____?」と表現します。例えば、「あなただったらどうしますか?」と聞くなら「What would you do?」、販売員に「あなただったら何をお勧めしますか?」と尋ねるなら「What would you recommend?」となります。
<例文>
Would you date someone older than you?
(あなただったら年上の人とお付き合いしますか?)
What would you do? Would you apologize?
(あなただったらどうしますか?謝りますか?)
Would you be open to living abroad?
(あなただったら外国に住むのはありですか?)
--------------------------------------------------
3) If I were you I would apologize.
→「私だったら謝ります」
--------------------------------------------------
「私だったら〜する」と相手の立場になって何かしらのアドバイスや提案をする場合に使われる表現です。shouldを使った表現よりも控えめに助言したい場合にピッタリの言い回しです。例えば、東京で給料の良い仕事のオファーが入ったが、家族の不幸で地元に引っ越さないといけなくなってしまったと友達に相談され、「私だったら仕事のオファーを断るかな」と言うなら「If I were you I would turn down the offer.」となります。
✔日常会話では「If I were you」を省いて、「I would _____」と直接言うことも一般的。
✔「If I were in your shoes, I would ______.(私があなたの立場だったら、〜をします」という言い方もある。
<例文>
If I were you I wouldn't go.
(私だったら行かないね。)
This milk expired 5 days ago. I wouldn't drink that if I were you.
(この牛乳の消費期限、5日前じゃん。私だったら飲まないよ。)
I would call them and ask for a refund.
(私だったら電話して返金を求めるけど。)
~丁寧・控えめな発言をする時~
--------------------------------------------------
1) Would you turn down the volume?
→「音量を下げてくれますか?」
--------------------------------------------------
人に何かをリクエストや依頼をする際に「Can you _____?(〜してくれる?)」よりも丁寧にお願いする場合は「Would you _____?(〜してくれますか?)」と表現します。例えば、「この用紙に記入してくれますか?」と丁寧に言いたいなら「Would you fill out this form?」になります。
✔より丁寧な言い方が「Would you mind _____?(〜してくれますか?)」。相手に気を使ったとても優しい質問の仕方。
<例文>
Would you close that window?
(あの窓を閉めてもらえますか?)
Would you be able to help?
(手伝っていただけないでしょうか?)
Would you mind changing seats?
(席を変わっていただけませんか?)
--------------------------------------------------
2) Would you like a drink?
→「お飲物はいかがですか?」
--------------------------------------------------
相手に「〜はいかがですか?」と何かを丁寧にオファーする際にピッタリの表現が「Would you like _____?」です。顧客や年上の人、または面識のない人に対して何かオファーする場合は、この表現を使うのが最も無難でしょう。例えば、会社に訪れた顧客に「熱いお茶はいかがですか?」と聞く場合は「Would you like some hot tea?」と言います。
✔友達や家族など、仲の良い人に対してこの表現はちょっと丁寧過ぎる。親しい関係であれば「Do you want _____?」でOK。
<例文>
Would you like a refill?
(飲み物のお代わりはいかがですか?)
Would you like to join us?
(よかったら一緒にどうですか?)
Would you like me to drive?
(私が運転しましょうか?)
--------------------------------------------------
3) I would say _____.
→「〜だと思う」
--------------------------------------------------
この言い方は自分の意見を述べたり何かを推定する時に使われ「〜だと思う」や「恐らく〜だろう」「〜かな」などに相当する表現です。ハッキリと言い切る感じではなく、物腰柔らかく控えめに発言している印象があります。例えば、「彼女、何歳だと思いますか?」と聞かれた際、相手に失礼ないよう謙虚に意見を述べる場合、「I’d say early thirties. Maybe 32.(30代前半だと思う。32歳くらいかな)」という具合に使います。
✔日常会話では「I would say」を「I’d say」と省略して言うことが多い。
✔大抵の場合、「I think」の代わりに「I’d say」が使える。「I think」よりも控えめな響き。
✔必ず答えが求めらるような質問をされた際、決定的な発言や返答を和らげる言い方として「I would have to say _____(〜と言わざるを得ない)」がある。
<例文>
I'd say it's a four to five hour drive.
(車で4時間から5時間くらいかかるかな。)
I'd say this logo looks the best. I like the color and simplicity.
(私はこのロゴが一番だと思います。色とシンプルさがいいと思います。)
Both speeches were excellent but I would have to say Adam's speech was better.
(二人ともスピーチは素晴らしかったですが、私はアダムのスピーチの方が良かったと思います。)
~自分の願望を述べる時~
--------------------------------------------------
1) I would love to go.
→「是非行きたいです」
--------------------------------------------------
「I would love to」は「I want to」と似た意味で「〜を(が)したい」といった強い願望を伝える時に使われれます。「I want to」の気持ちをより強調した言い方です。例えば、同僚に食事を一緒にしないかと誘われた際、「I would love to join you guys for dinner.」と言います。
✔相手の誘いを快く受け入れるときに使われる定番フレーズが「I’d love to!(喜んで!)」
✔その他、相手の誘いを丁寧に断るときに使われる決まり文句でもあり、「I’d love to ____ but _____(〜したいのは山々なのですが、〜)」が定番フレーズになる。
<例文>
I would love to meet with you next week.
(是非、来週お会いしたいと思います。)
I'd love to! What time should I be there?
(喜んで!何時に行けばいいですか?)
I'd love to stay and chat some more but I have to get going.
(残ってもっとお話をしたいのですが、そろそろ行かないといけません。)
--------------------------------------------------
2) I would like to think that ____.
→「〜であると考えたい」
--------------------------------------------------
この表現は「真相はわからないけど、そうであって欲しい・・・」のようなニュアンスとして使われます。例えば、Facebookの個人情報の取り扱いに対し、多少の疑いはあるものの情報はしっかり保護されていると信じたいといった気持ちを表す場合は「I would like to think that Facebook protects our personal information.」となります。また、自分の発言や意見を物腰柔らかく控えめなニュアンスにする役割もあります。例えば、「あなたは良い父親だと思いますか?」という質問に対し「I would like to think I’m a good father.」と答えると、「私は良い父親であると考えたいのですが・・・」といった具合に謙虚な響きになります。
✔日常会話では「I would」を「I'd」と短縮して言うことが多い。
✔「そうだと思いたい」は「I would like to think so.」
<例文>
I would like to think that hard work pays off.
(努力は報われると信じたいです。)
I would like to think professional athletes don't use drugs.
(プロスポーツ選手は、薬物を使用していないと信じたい。)
I would like to think my English is getting better.
(自分の英語力が上達してるって思いたいや〜ん。)
~~~~~~~~~~~~~~~~~~~
無料メルマガ『1日1フレーズ!生英語』配信中!
通勤・通学などのちょとした合間を利用して英語が学べるメルマガ『1日1フレーズ!生英語』を平日の毎朝6時に配信中!ただ単にフレーズを紹介しているだけではなく、音声を使った学習プロセスが組み込まれているので、メルマガを読むこと自体が学習方法!
https://hapaeikaiwa.com/mailmagazine/
~~~~~~~~~~~~~~~~~~~
turn down用法 在 玳瑚師父 Master Dai Hu Facebook 八卦
《純真的愛》
True Love
(English version below)
感情的事,本來就是你情我願。
兩個人都是大人了。
當初你們親密時,難道他有拿槍逼妳嗎?
怎麼現在妳就變成母夜叉,還請人幫妳下降頭呢?
那根本不是愛,是恨。
妳跟有婦之夫在一起,本來就是錯。
醒醒,快醒醒!
這是一種惡行,不能夠用法術去對付不懂法術的人。
拿妳錢的降頭師,將來也一定會有禍害。
妳的這個舉動,害了多少人,下一世妳都得還。
我們做什麼都瞞不過天地,鬼神是無所不在的。
現在妳害他,未來他也找人來對付妳,這樣冤冤相報,何時了?
妳要趕快洗刷妳下地獄的惡因。
悔不當初以外,妳也要把妳的故事告訴別人,提醒大家千萬不要走妳的路。
這是一個「大善」!
將不好的事情拋出心外,才能真正地掃除妳的憂鬱。
妳希望別人對妳專一,妳要先能夠對人專一。
⋯⋯⋯⋯⋯⋯⋯⋯
It always takes two hands to clap when it comes to affairs of the heart. Both of you are willing parties, and mature adults. When you shared intimate moments, did he use a gun to force you?
Why did you turn into an evil demoness, even hiring a sorcerer to cast malevolent spells onto him?
That is not love at all, but hatred.
You were wrong in the first place to even start a relationship with him, a married man.
Wake up, please hurry and wake up!
This is an act of pure evil. You cannot use spells on a person with no such skills. The person who took your money to cast the evil spell shall reap his just deserts. Your act has brought harm to so many people and you shall pay your dues in your next life.
Whatever we do can never be hidden from the Heaven and Earth, for the gods and spirits are omnipresent. You inflicted harm on him this time, and he will get back at you in time to come.
When is this vicious cycle of hatred and revenge going to end?
You need to quickly uproot your karmic seeds of suffering in Hades. Beside repentance, you must share your story and warn others against going down your path. This is an act of great virtue!
Trash the unhappy issues out from your heart, to truly rid yourself of worry and depression.
You wish for your partner to be faithful, but you must first do your part to be one.
www.masterdaihu.com/true-love/
turn down用法 在 turn on me 背叛我| be turned off by 被人搞得很不開心| 吉娜英文 的八卦
turn on 例句網頁:http://www.ginateacher.com/lessons/english-phrase/unit-01/turn-on/turn-on-player-page.html回到片語選單,就可以看到 turn off ... ... <看更多>
turn down用法 在 YouTube Data API Overview - Google Developers 的八卦
Introduction
This document is intended for developers who want to write applications that interact with YouTube. It explains basic concepts of YouTube and of the API itself. It also provides an overview of the different functions that the API supports.
Before you startYou need a Google Account to access the Google API Console, request an API key, and register your application.
Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
Go to the API Console and select the project that you just registered.
Visit the Enabled APIs page.
In the list of APIs, make sure the status is ON for the YouTube Data API v3.
If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.
Select a client library to simplify your API implementation.
Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see json.org.
Resources and resource types
A resource is an individual data entity with a unique identifier. The table below describes the different types of resources that you can interact with using the API.
Resources
activity
Contains information about an action that a particular user has taken on the YouTube site. User actions that are reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, and posting a channel bulletin, among others.
channel
Contains information about a single YouTube channel.
channelBanner
Identifies the URL to use to set a newly uploaded image as the banner image for a channel.
channelSection
Contains information about a set of videos that a channel has chosen to feature. For example, a section could feature a channel's latest uploads, most popular uploads, or videos from one or more playlists.
guideCategory
Identifies a category that YouTube associates with channels based on their content or other indicators, such as popularity. Guide categories seek to organize channels in a way that makes it easier for YouTube users to find the content they're looking for. While channels could be associated with one or more guide categories, they are not guaranteed to be in any guide categories.
i18nLanguage
Identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language.
i18nRegion
Identifies a geographic area that a YouTube user can select as the preferred content region. The content region can also be referred to as a content locale.
playlist
Represents a single YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users.
playlistItem
Identifies a resource, such as a video, that is part of a playlist. The playlistItem resource also contains details that explain how the included resource is used in the playlist.
search result
Contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data.
subscription
Contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
thumbnail
Identifies thumbnail images associated with a resource.
video
Represents a single YouTube video.
videoCategory
Identifies a category that has been or could be associated with uploaded videos.
watermark
Identifies an image that displays during playbacks of a specified channel's videos. The channel owner can also specify a target channel to which the image links as well as timing details that determine when the watermark appears during video playbacks and then length of time it is visible.
Note that, in many cases, a resource contains references to other resources. For example, a playlistItem
resource's snippet.resourceId.videoId
property identifies a video resource that, in turn, contains complete information about the video. As another example, a search result contains either a videoId
, playlistId
, or channelId
property that identifies a particular video, playlist, or channel resource.
The following table shows the most common methods that the API supports. Some resources also support other methods that perform functions more specific to those resources. For example, the videos.rate
method associates a user rating with a video, and the thumbnails.set
method uploads a video thumbnail image to YouTube and associates it with a video.
Operations
list
Retrieves (
GET
) a list of zero or more resources.insert
Creates (
POST
) a new resource.update
Modifies (
PUT
) an existing resource to reflect data in your request.delete
Removes (
DELETE
) a specific resource.The API currently supports methods to list each of the supported resource types, and it supports write operations for many resources as well.
The table below identifies the operations that are supported for different types of resources. Operations that insert, update, or delete resources always require user authorization. In some cases, list
methods support both authorized and unauthorized requests, where unauthorized requests only retrieve public data while authorized requests can also retrieve information about or private to the currently authenticated user.
Supported Operations
list
insert
update
delete
activity
caption
channel
channelBanner
channelSection
comment
commentThread
guideCategory
i18nLanguage
i18nRegion
playlist
playlistItem
search result
subscription
thumbnail
video
videoCategory
watermark
Quota usage
The YouTube Data API uses a quota to ensure that developers use the service as intended and do not create applications that unfairly reduce service quality or limit access for others. All API requests, including invalid requests, incur at least a one-point quota cost. You can find the quota available to your application in the API Console.
Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the overwhelming majority of our API users. Default quota, which is subject to change, helps us optimize quota allocations and scale our infrastructure in a way that is more meaningful to our API users. You can see your quota usage on the Quotas page in the API Console.
Note: If you reach the quota limit, you can request additional quota by
completing the Quota extension
request form for YouTube API Services.
Google calculates your quota usage by assigning a cost to each request. Different types of
operations have different quota costs. For example:
A read operation that retrieves a list of resources -- channels, videos, playlists -- usually
costs 1 unit.
A write operation that creates, updates, or deletes a resource usually has costs
50
units.A search request costs
100
units.A video upload costs
1600
units.The Quota costs for API requests table shows the
quota cost of each API method. With these rules in mind, you can estimate the number of requests
that your application could send per day without exceeding your quota.
The API allows, and actually requires, the retrieval of partial resources so that applications avoid transferring, parsing, and storing unneeded data. This approach also ensures that the API uses network, CPU, and memory resources more efficiently.
The API supports two request parameters, which are explained in the following sections, that enable you to identify the resource properties that should be included in API responses.
The part
parameter identifies groups of properties that should be returned for a resource.
The fields
parameter filters the API response to only return specific properties within the requested resource parts.
part
parameterThe part
parameter is a required parameter for any API request that retrieves or returns a resource. The parameter identifies one or more top-level (non-nested) resource properties that should be included in an API response. For example, a video
resource has the following parts:
snippet
contentDetails
fileDetails
player
processingDetails
recordingDetails
statistics
status
suggestions
topicDetails
All of these parts are objects that contain nested properties, and you can think of these objects as groups of metadata fields that the API server might (or might not) retrieve. As such, the part
parameter requires you to select the resource components that your application actually uses. This requirement serves two key purposes:
It reduces latency by preventing the API server from spending time retrieving metadata fields that your application doesn't use.
It reduces bandwidth usage by reducing (or eliminating) the amount of unnecessary data that your application might retrieve.
Over time, as resources add more parts, these benefits will only increase since your application will not be requesting newly introduced properties that it doesn't support.
How to use thefields
parameterThe fields
parameter filters the API response, which only contains the resource parts identified in the part
parameter value, so that the response only includes a specific set of fields. The fields
parameter lets you remove nested properties from an API response and thereby further reduce your bandwidth usage. (The part
parameter cannot be used to filter nested properties from a response.)
The following rules explain the supported syntax for the fields
parameter value, which is loosely based on XPath syntax:
Use a comma-separated list (fields=a,b
) to select multiple fields.
Use an asterisk (fields=*
) as a wildcard to identify all fields.
Use parentheses (fields=a(b,c)
) to specify a group of nested properties that will be included in the API response.
Use a forward slash (fields=a/b
) to identify a nested property.
In practice, these rules often allow several different fields
parameter values to retrieve the same API response. For example, if you want to retrieve the playlist item ID, title, and position for every item in a playlist, you could use any of the following values:
fields=items/id,playlistItems/snippet/title,playlistItems/snippet/position
fields=items(id,snippet/title,snippet/position)
fields=items(id,snippet(title,position))
Note: As with all query parameter values, the fields
parameter value must be URL encoded. For better readability, the examples in this document omit the encoding.
The examples below demonstrate how you can use the part
and fields
parameters to ensure that API responses only include the data that your application uses:
Example 1 returns a video resource that includes four parts as well as
kind
and etag
properties.Example 2 returns a video resource that includes two parts as well as
kind
and etag
properties.Example 3 returns a video resource that includes two parts but excludes
kind
and etag
properties.Example 4 returns a video resource that includes two parts but excludes
kind
and etag
as well as some nested properties in the resource's snippet
object.Example 1
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,contentDetails,statistics,statusDescription: This example retrieves avideo
resource and identifies several
resource parts that should be included in the API response.API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"contentDetails": {
"duration": "PT15M51S",
"aspectRatio": "RATIO_16_9"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
},
"status": {
"uploadStatus": "STATUS_PROCESSED",
"privacyStatus": "PRIVACY_PUBLIC"
}
}
]
}
Example 2
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statisticsDescription: This example modifies thepart
parameter value so that the
contentDetails
andstatus
properties are not included
in the response.API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 3
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statistics&fields=items(id,snippet,statistics)Description: This example adds thefields
parameter to remove all
kind
andetag
properties from the API response.API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 4
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statisticsDescription: This example modifies thefields
parameter from example 3
so that in the API response, each video resource'ssnippet
object only includes thechannelId
,title
,
andcategoryId
properties.API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Optimizing performance
Using ETags
ETags, a standard part of the HTTP protocol, allow applications to refer to a specific version of a particular API resource. The resource could be an entire feed or an item in that feed. This functionality supports the following use cases:
Caching and conditional retrieval – Your application can cache API resources and their ETags. Then, when your application requests a stored resource again, it specifies the ETag associated with that resource. If the resource has changed, the API returns the modified resource and the ETag associated with that version of the resource. If the resource has not changed, the API returns an HTTP 304 response (Not Modified
), which indicates that the resource has not changed. Your application can reduce latency and bandwidth usage by serving cached resources in this manner.
The client libraries for Google APIs differ in their support of ETags. For example, the JavaScript client library supports ETags via a whitelist for allowed request headers that includes If-Match
and If-None-Match
. The whitelist allows normal browser caching to occur so that if a resource's ETag has not changed, the resource can be served from the browser cache. The Obj-C client, on the other hand, does not support ETags.
Protecting against inadvertent overwrites of changes – ETags help to ensure that multiple API clients don't inadvertently overwrite each other's changes. When updating or deleting a resource, your application can specify the resource's ETag. If the ETag doesn't match the most recent version of that resource, then the API request fails.
Using ETags in your application provides several benefits:
The API responds more quickly to requests for cached but unchanged resources, yielding lower latency and lower bandwidth usage.Your application will not inadvertently overwrite changes to a resource that were made from another API client.
The Google APIs Client Library for JavaScript supports If-Match
and If-None-Match
HTTP request headers, thereby enabling ETags to work within the context of normal browser caching.
Using gzip
You can also reduce the bandwidth needed for each API response by enabling gzip compression. While your application will need additional CPU time to uncompress API responses, the benefit of consuming fewer network resources usually outweighs that cost.
To receive a gzip-encoded response you must do two things:
Set the Accept-Encoding
HTTP request header to gzip
.
Modify your user agent to contain the string gzip
.
The sample HTTP headers below demonstrate these requirements for enabling gzip compression:
Accept-Encoding: gzip
User-Agent: my program (gzip)
... <看更多>
turn down用法 在 turn it down意思-在PTT/IG/網紅社群上服務品牌流行穿搭 的八卦
找turn it down意思在Dcard與PTT討論/評價與推薦,提供turn it down意思相關資訊,找turn ... そこで今回、過去の記事でも紹介した用法を含め、日常会話において基本と ... ... <看更多>