Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
851cd549
Commit
851cd549
authored
Jun 09, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished InMobiShorts model mapping
parent
f58f3a79
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
51 deletions
+70
-51
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-34
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+23
-2
InMobiShortsSource/InMobiShortsPG.playground/Contents.swift
+6
-0
InMobiShortsSource/InMobiShortsPG.playground/contents.xcplayground
+5
-0
InMobiShortsSource/InMobiShortsSource.xcodeproj/project.pbxproj
+2
-0
InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift
+3
-3
InMobiShortsSource/InMobiShortsSource/Models/GlanceDetails.swift
+15
-9
InMobiShortsSource/InMobiShortsSource/Models/Peek.swift
+8
-1
InMobiShortsSource/InMobiShortsSource/Models/PeekData.swift
+7
-1
No files found.
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
851cd549
...
...
@@ -12,7 +12,7 @@
<
k
e
y
>
OneWeatherNotificationServiceExtension.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
5
7
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
5
5
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
851cd549
...
...
@@ -3,38 +3,4 @@
uuid =
"55281C35-FE9F-4CED-865E-FBED0E7393F6"
type =
"0"
version =
"2.0"
>
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"7E92F321-211B-4E2A-A0ED-7D8541E572CA"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"88"
endingLineNumber =
"88"
landmarkName =
"updateShorts(completion:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"A47DA89D-0414-467A-9D69-CB580EA7F2F1"
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"80"
endingLineNumber =
"80"
landmarkName =
"updateShorts(completion:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
851cd549
...
...
@@ -4,6 +4,27 @@
<
d
i
c
t
>
<
k
e
y
>
SchemeUserState
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
InMobiShortsPG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
64
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
InMobiShortsPG
(
Playground
)
2.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
65
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
InMobiShortsPG
(
Playground
)
.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
63
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
OneWeatherCorePlayground
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
...
...
@@ -135,7 +156,7 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
6
0
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
6
1
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
@@ -268,7 +289,7 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
6
1
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
6
2
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
InMobiShortsSource/InMobiShortsPG.playground/Contents.swift
0 → 100644
View file @
851cd549
import
UIKit
let
urlString
=
"https://kiowacountypress.net/content/hurricanes-wildfires-tornadoes-floods-–-whatever-your-local-risk-heres-how-be-more-weather"
let
encodedString
=
urlString
.
addingPercentEncoding
(
withAllowedCharacters
:
.
urlQueryAllowed
)
let
url
=
URL
(
string
:
encodedString
!
)
InMobiShortsSource/InMobiShortsPG.playground/contents.xcplayground
0 → 100644
View file @
851cd549
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground
version=
'5.0'
target-platform=
'ios'
buildActiveScheme=
'true'
importAppTypes=
'true'
>
<timeline
fileName=
'timeline.xctimeline'
/>
</playground>
\ No newline at end of file
InMobiShortsSource/InMobiShortsSource.xcodeproj/project.pbxproj
View file @
851cd549
...
...
@@ -31,6 +31,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
CD2C227E2670AC6D001ADA9A
/* InMobiShortsPG.playground */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.playground
;
path
=
InMobiShortsPG.playground
;
sourceTree
=
"<group>"
;
xcLanguageSpecificationIdentifier
=
xcode.lang.swift
;
};
CD427D1E266F657900B4350A
/* OneWeatherCore.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
OneWeatherCore.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
CD427D22266F715900B4350A
/* OneWeatherAnalytics.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
OneWeatherAnalytics.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
CDFE3F08266E407A00E72910
/* InMobiShortsSource.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
InMobiShortsSource.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
...
...
@@ -80,6 +81,7 @@
CDFE3EFE266E407A00E72910
=
{
isa
=
PBXGroup
;
children
=
(
CD2C227E2670AC6D001ADA9A
/* InMobiShortsPG.playground */
,
CDFE3F0A266E407A00E72910
/* InMobiShortsSource */
,
CDFE3F15266E407A00E72910
/* InMobiShortsSourceTests */
,
CDFE3F09266E407A00E72910
/* Products */
,
...
...
InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift
View file @
851cd549
...
...
@@ -135,14 +135,14 @@ public class InMobiShortSource: ShortSource {
updatedAtInSecs
:
glanceDetails
.
updatedAtInSecs
,
startsAtInSecs
:
glanceDetails
.
startsAtInSecs
,
endsAtInSecs
:
glanceDetails
.
endsAtInSecs
,
shareURL
:
glanceDetails
.
s
hareURL
,
shareURL
:
glanceDetails
.
encodedS
hareURL
,
title
:
glanceDetails
.
peekData
.
title
,
summaryText
:
glanceDetails
.
peek
.
articlePeek
.
summary
,
sourceName
:
glanceDetails
.
peekData
.
sourceName
,
heartCount
:
glanceDetails
.
peekData
.
heartCount
,
shortURL
:
glanceDetails
.
peekData
.
s
hortURL
,
shortURL
:
glanceDetails
.
peekData
.
encodedS
hortURL
,
ctaText
:
glanceDetails
.
peekData
.
ctaText
,
ctaURL
:
glanceDetails
.
peek
.
articlePeek
.
cta
.
u
rl
,
ctaURL
:
glanceDetails
.
peek
.
articlePeek
.
cta
.
encodedU
rl
,
likeCount
:
glanceDetails
.
glanceInteractionDetails
.
likeCount
,
shareCount
:
glanceDetails
.
glanceInteractionDetails
.
shareCount
)
}
...
...
InMobiShortsSource/InMobiShortsSource/Models/GlanceDetails.swift
View file @
851cd549
...
...
@@ -13,13 +13,19 @@ struct GlanceInteractionDetails: Codable {
}
struct
GlanceDetails
:
Codable
{
public
let
id
:
String
public
let
image
:
GlanceImage
public
let
updatedAtInSecs
:
TimeInterval
public
let
startsAtInSecs
:
TimeInterval
public
let
endsAtInSecs
:
TimeInterval
public
let
shareURL
:
URL
?
public
let
peekData
:
PeekData
public
let
peek
:
Peek
public
let
glanceInteractionDetails
:
GlanceInteractionDetails
let
id
:
String
let
image
:
GlanceImage
let
updatedAtInSecs
:
TimeInterval
let
startsAtInSecs
:
TimeInterval
let
endsAtInSecs
:
TimeInterval
var
encodedShareURL
:
URL
?
{
guard
let
urlStirng
=
shareUrl
else
{
return
nil
}
return
URL
(
string
:
urlStirng
)
}
let
peekData
:
PeekData
let
peek
:
Peek
let
glanceInteractionDetails
:
GlanceInteractionDetails
private
let
shareUrl
:
String
?
}
InMobiShortsSource/InMobiShortsSource/Models/Peek.swift
View file @
851cd549
...
...
@@ -17,7 +17,14 @@ struct ArticlePeek: Codable {
}
struct
GlanceCTA
:
Codable
{
let
url
:
URL
?
var
encodedUrl
:
URL
?
{
guard
let
urlString
=
url
?
.
addingPercentEncoding
(
withAllowedCharacters
:
.
urlQueryAllowed
)
else
{
return
nil
}
return
URL
(
string
:
urlString
)
}
private
let
url
:
String
?
let
text
:
String
}
InMobiShortsSource/InMobiShortsSource/Models/PeekData.swift
View file @
851cd549
...
...
@@ -11,6 +11,12 @@ struct PeekData: Codable {
let
title
:
String
let
sourceName
:
String
let
heartCount
:
Int
let
shortURL
:
URL
?
var
encodedShortURL
:
URL
?
{
guard
let
urlString
=
shortUrl
else
{
return
nil
}
return
URL
(
string
:
urlString
)
}
let
ctaText
:
String
private
let
shortUrl
:
String
?
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment